Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combining sub-directories 1

Status
Not open for further replies.

sacsac

Programmer
Dec 10, 2000
177
GB
I'm struggling to create workable code to do what appears to be a simple task!
I have a directory A, containing several hundred sub-directories, each one of which contains many individual files.
I want to move ALL the individual files into a single new directory.
Any help appreciated.
 
Here is some VBA code to loop through files in a folder (and sub folders), but it should work just fine in VB6

But you would need to be sure that all file names from those sub-directories are unique, or you will need to check and - possibly - rename some of them.

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson
 
That's brilliant - very many thanks.
 
sacsac, it is traditional around here to mark a useful response as a 'Great Post'
 
strongm
So long since I used the forum that I forgot about the 'Great Post' flag - now done, and thanks for drawing my attention to it.

----
Stephen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top