Professional Documents
Culture Documents
Copy Files
Copy Files
Copy Files
I managed to get this code to work. It copies all folders / files and sub folders
and their files to the new destination (strTarget).
I have not added checks and balances like 1) if the files and folders exist
already. 2) if the source files are open etc. So those additions could be useful.
I got this code from Barry's post but needed to change it to make it work for me,
so thought i'd share it again anyway.
strPath is the source path and strTarget is the destination path. both paths should
end in '\'
Note: one needs to add "Microsoft Scripting Runtime" under "Tools / References" for
FSO to work.
==================== call ================================
MkDir "DestinationPath"
CopyFiles FolderInFromFolder.Path & "\", strTarget & "\" & strFolderName &
"\"
Next 'Folder
End Sub
****************************************
I found the solution here:
End Sub