ROBOCOPY Batch Scripting
A simple scheduled script I wrote to sync some files to Dropbox. I prefer it over XCOPY as it will remove/purge files automatically that's no longer needed with the /MIR (mirror) parameter.
@ECHO OFF ECHO "DaG" backup... ROBOCOPY "C:\MyFiles" "D:\Dropbox\MyFiles" /MIR /NP /LOG:"D:\Dropbox\MyFiles\logg.txt" ECHO Ferdig. REM PAUSE
Might wanna add
/ZBparameter if dealing with potential locked files, which will make it use backup mode on those occations, but this will still NOT copy open files, only bypass NTFS ACL restrictions. To bypass locked open files in use I use
/XFto exclude (e.g.