Hello everyone,
I hope I am posting this question in the write forum. I looked through all the other ones and this seemed like the best place. If not i appologize in advance.
I have a code that I wrote in VBS to copy contents from one folder to another. I made it so that it wont overwrite the folder if it already exists, but now i want to expand on this. I want to make it so that it will copy folders from one to the other but it will update the contents inside the folder. If a file already exisits in the folder dont overwrite but if a file does not exisit then add that file.
Appreciate any help with this
thanks!
Here is what i have so far.
I hope I am posting this question in the write forum. I looked through all the other ones and this seemed like the best place. If not i appologize in advance.
I have a code that I wrote in VBS to copy contents from one folder to another. I made it so that it wont overwrite the folder if it already exists, but now i want to expand on this. I want to make it so that it will copy folders from one to the other but it will update the contents inside the folder. If a file already exisits in the folder dont overwrite but if a file does not exisit then add that file.
Appreciate any help with this
thanks!
Here is what i have so far.
Code:
Option Explicit
Dim strSourceDir, strDestinDir, FSO
const OverwriteExisting = False
strSourceDir = "I:\TestFolder1\*.*"
strDestinDir = "I:\TestFolder2\"
on error resume next
set FSO = CreateObject("Scripting.FileSystemObject")
FSO.CopyFolder strSourceDir , strDestinDir , OverWriteExisting
Comment