Skip to content

Instantly share code, notes, and snippets.

@scruffydan
Last active April 5, 2018 17:19
Show Gist options
  • Save scruffydan/5ac91905560f6712665e045ac6eb6c0f to your computer and use it in GitHub Desktop.
Save scruffydan/5ac91905560f6712665e045ac6eb6c0f to your computer and use it in GitHub Desktop.
Robocopy Scripts
A small collection of useful robocopy scripts
:: Creates a mirror of the source permissions at the destination, files are not copyied
:: Run as an administrator
robocopy "\\SOURCE\UNC" "\\DESTINATION\UNC" /s /zb /secfix /copy:ATSOU /r:3 /w:3 /MT:64 /v /log:C:\loglocation
:: Creates a mirror of the source at the destination, including file permissions
:: Useful for migrating to a new server
:: Run as an administrator
:: Use the /sl to prevent robocopy from follwing symlinks
robocopy "\\SOURCE\UNC" "\\DESTINATION\UNC" /s /zb /secfix /copyall /mir /r:3 /w:3 /MT:64 /v /log:C:\loglocation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment