Last active
January 22, 2024 03:38
A bunch of robocopy flags to help backup an external drive.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
robocopy /b /e /xa:s /xjd /sl /a-:hs /mt /v /fp /eta /log:"D:\To\Directory\transfer.log" /tee "C:\From\Directory" "D:\To\Directory" | |
(Note that the paths don't have a trailing backslash.) | |
/b -- backup mode (there's a /zb option for restart mode, but it's a whole lot slower) | |
/e -- copies subdirectories (including empty directories) in addition to files | |
/xa:s -- exclude system files | |
/xjd -- exclude junction points | |
/sl -- copy symbolic links as links | |
/a-:hs -- remove hidden/system attributes from files | |
/mt -- multithreaded | |
/v -- verbose output + skipped | |
/fp -- full path of files in output | |
/eta -- time remaining | |
/log:logfile.txt -- redirect output to file | |
/tee -- duplicate log to console window | |
By default, data, attributes, and time stamps are copied. ACL permissions, owner information, | |
and auditing information are ignored. (You can modify this behavior with the /copy flag.) | |
Some potentially helpful regexes for the log: | |
^\s*New File.*?\n | |
^\s*?\d+[%].*?\n | |
^\s*New Dir.*?\n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Logfile Analysis'
Unchanged folders always start with a number - if you create a analysis script to exclude all the lines starting with a number you will only see the changes and the summary text in the result. It's easier than using the regexes above that may miss some things.