I Use the following VB script( Shell object ) to copy folders & files from \server\kits_location To D:\ ,
We also get Displays of the Copying Files progress dialog as the folder is being copied.
Source PATH – \\server\kits_location
Target PATH – D:\
This VB script run every week in order to update files on the target drive “D:\”
Usually files on source ( \server\kits_location ) not modified so in this case we not have difference between source files to target files
Because files are very big ( 1-10G) ,
I want to copy only files that have different modify date
so only source files that has diff modify date from target files will copied to target drive ( D:\ )
Please advice what I need to add in my VB script in order to copy only the diff files from source to target
my VB script
createobject("wscript.shell").popup "Start Copy FCO Kits from network server - \\server\kits_location\ to D:\ drive ", 2, "", 64
Set objShell = CreateObject("Shell.Application")
Const FOF_CREATEPROGRESSDLG = &H0&
strPictureTargetDIR = "D:\"
Set objFolder = objShell.NameSpace(strPictureTargetDIR)
' Copy Kits from network server to D:\ drive
objFolder.CopyHere "\\server\kits_location\", FOF_CREATEPROGRESSDLG
set objShell = Nothing
You could use
XCOPYlike this to copy from a source to destination directoryPlease change your paths to suit
I have used these switches
/r Overwrites read-only files