AlexanderBB
Well-known Member
- Joined
- Jul 1, 2009
- Messages
- 1,835
- Office Version
- 2019
- 2016
- Platform
- Windows
Having a bit of trouble with this.
I want to copy a Folder including it's contents and any subfolders (and their contents)
I have set a reference to Microsoft Scripting RunTime.
I reach Stop without error and the Folders are created (and subfolders filled) but no files are copied to the top folder "M:\Test\Volume 1"
I want to copy a Folder including it's contents and any subfolders (and their contents)
I have set a reference to Microsoft Scripting RunTime.
VBA Code:
Dim fs As New FileSystemObject
Set fs = CreateObject("Scripting.FileSystemObject")
for i =1 to 10
MkDir "M:\Test\Volume " & i
Call fs.CopyFolder("D:\Data*", "M:\Test\Volume " & i & "\")
stop
Next