robocopy F:\SOURCE D:\DESTINATION\ /MIR /FFT /Z /W:0 /R:0 /tee /log:Sync.log
- /MIR specifies that robocopy should mirror the source directory and the destination directory. Beware that this may delete files at the destination.
- /FFT uses fat file timing instead of NTFS. This means the granularity is a bit less precise.
- /W:5 reduces the wait time between failures to 5 seconds instead of the 30 second default.
- /R:2 reduces the repeat count of failures to 2 tries instead of the 1000000(!) default retries.
- /Z ensures robocopy can resume the transfer of a large file in mid-file instead of restarting.
- /B copy files in Backup mode.
- /ZB use restartable mode; if access denied use Backup mode.
- /MT[:n] Do multi-threaded copies with n threads (default 8).
- /CREATE creates directories and zero-length files only.
- /XF file [file]… eXclude Files matching given names/paths/wildcards.
- /XD dirs [dirs]… eXclude Directories matching given names/paths.
- /XA:H makes robocopy ignore hidden files, usually these will be system files that we’re not interested in.
- /log:RobocopySync.log write output into logfile instead stdout. Use in combination with /tee to get output to stdout AND logfile
- /COPY:copyflag[s] what to COPY for files (default is /COPY:DAT). (copyflags : D=Data, A=Attributes, T=Timestamps). (S=Security=NTFS ACLs, O=Owner info, U=aUditing info).
- /COPYALL Same as /COPY:DATSOU)
- /L List only – don’t copy, timestamp or delete any files. (like DRY-RUN)