1
I have an access to a network drive where news folder are created everyday. This drive is named G:
I want to backup all the folders from G:\ to D:\WebUpload
Being given that there are a lot of files, I would like to copy only the newest. By the newest I mean the files that are not backuped yet from G: to D:
I created this script
robocopy G:\ D:\WebUpload\ /E /XO /R:3 /W:5 /XA:S /XF *.tmp *.bak /TEE /XD $RECYCLE.BIN "System Volume Information"
But this script copy the whole content everytime.
EDIT
I edited the script to add /FFT
robocopy G:\ D:\WebUpload\ /E /FFT /XO /R:3 /W:5 /XA:S /TEE /XD $RECYCLE.BIN "System Volume Information"
REM Source to Dest
REM /E Subfolder
REM /XO Exclude old files
REM /R Retry x times
REM /W sec between each retry
REM /TEE Display in the command prompt
REM /XD Exclude [][]
You can see that the folder named 20150304103_8 is present on both location G:\ and D:\WebUpload.
But the script analyse each file in this folder. It takes 1 second / file and I have >1000 files for few folders... So it is too long
/XO should do exactly that. It will check all files but won't copy if it already exists at the target location. – HoD – 2015-08-21T12:06:07.890
Are you saying this doesn't work? – Dave – 2015-08-21T12:29:52.000
/MIR might be helpful but this will also delete files off the backup destination when they are deleted from the source; this might not be what you want. – Richard Lucas – 2015-08-21T13:06:34.273
@Dave Yes, the script copy all files despite the fact that they are already backuped in D:\WebUpload – Atnaize – 2015-08-21T13:19:26.383