How to skip existing and/or same size files when using robocopy

前端 未结 2 500
我寻月下人不归
我寻月下人不归 2020-12-21 06:29

I have this code:

@echo on
set source=\"R:\\Contracts\\\"
set destination=\"R:\\Contracts\\Sites\"

::Not sure if this is needed
::It guarantees you have a c         


        
2条回答
  •  Happy的楠姐
    2020-12-21 06:59

    Do you want to exclude files of the same size, or files that haven't changed? If it's the latter, use the /XO switch in RoboCopy to exclude files that are older than those they're being copied over.

    RoboCopy "%%F" %destination% *.srt *.pdf *.mp4 *.jpg /COPYALL /XO /R:0
    

提交回复
热议问题