how can i copy one folder to many subfolders??

miketamp

Registered User.
Local time
Today, 12:51
Joined
Mar 30, 2005
Messages
22
Hi there
i have this code to copy the contents of the source folder to many subfolders:

Private Sub Command0_Click()
Dim fso As Scripting.FileSystemObject
Set fso = CreateObject("Scripting.FileSystemObject")
Dim dfol As Folder
Dim sfol As Folder
Dim subfldr As Folder
Set sfol = fso.GetFolder("c:\source")
Set dfol = fso.GetFolder("c:\destination\")
For Each subfldr In dfol.SubFolders
fso.CopyFolder sfol.Path, subfldr.Path
Next subfldr
Set sfol = Nothing
Set dfol = Nothing
End Sub

Now i want to copy the source folder include the subfolders to many folders.
for example:
i have the "C:\source\" and the "C:\destination\folder1"
and "c:\destination\folder2".I would like to copy the source with the subfolders in the two folders of destination. Not only the contents of the source folder.
Can you please help me?
thanx...
 

Users who are viewing this thread

Back
Top Bottom