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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy fils to multiple folders 1

Status
Not open for further replies.

into

Technical User
Dec 16, 2002
17
Haw can i go about moving all files in a folder to all folders in an another folder?


copy c:\folder\*.* c:\directory

result

c:\
Folder
File1.txt
File2.log
Directory
Folder1
File1.txt
File2.log
Folder2
File1.txt
File2.log

Hope i'm making myself understood.


//Torfi




 
Set objFT = FSO.GetFOlder("c:\directory")
For Each aFolder In objFT.SubFolders
FSO.CopyFolder "c:\test\*.*", "c:\directory\" & aFolder.Name, True
Next

i am sure you could tidy up "c:\directory\" & aFolder.Name and you might need to work on .CopyFolder 1st param
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top