How to skip existing and/or same size files when using robocopy
-
30-10-2019 - |
Question
I have this code, thanks to this forum:
@echo on
set source="R:\Contracts\"
set destination="R:\Contracts\Sites"
::Not sure if this is needed
::It guarantees you have a canonical path (standard form)
for %%F in (%destination%) do set destination="%%~fF"
for /r %source% %%F in (.) do if "%%~fF" neq %destination% ROBOCOPY "%%F" %destination% *.srt *.pdf *.mp4 *.jpg /COPYALL /R:0
Pause
I am not sure if the code above has "SKIP commands" if file exists / or skip if file is the same size.
It seems to take a long time for 400 files. I would like to get this right as soon it will be 40000 files.
Thank you.
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow