hello,
i have this simple script:
Dim fso
Dim path
Dim oFolder
Dim oSubFolder
Const OverwriteExisting = True
Set fso = createobject("Scripting.FileSystemObject")
File = "c:\test.txt"
Path = "c:\temp"
Set oFolder = fso.GetFolder(Path)
Set colSubfolders = oFolder.Subfolders
For Each oSubfolder in colSubfolders
fso.CopyFile File , OverwriteExisting
Next
What I want to do is copy that single file to every subfolder underneath the c:\temp folder. There are thousands and thousands of folders, and the subfolder depth may go as much as 40-50 folders deep within one folder. The script above copies the file to one subfolder level, but not anything beyond that. Can I make it so I can copy the file to as many subfolders as what I have?
Thank you,
Moogeboo
i have this simple script:
Dim fso
Dim path
Dim oFolder
Dim oSubFolder
Const OverwriteExisting = True
Set fso = createobject("Scripting.FileSystemObject")
File = "c:\test.txt"
Path = "c:\temp"
Set oFolder = fso.GetFolder(Path)
Set colSubfolders = oFolder.Subfolders
For Each oSubfolder in colSubfolders
fso.CopyFile File , OverwriteExisting
Next
What I want to do is copy that single file to every subfolder underneath the c:\temp folder. There are thousands and thousands of folders, and the subfolder depth may go as much as 40-50 folders deep within one folder. The script above copies the file to one subfolder level, but not anything beyond that. Can I make it so I can copy the file to as many subfolders as what I have?
Thank you,
Moogeboo