Pages

Wednesday, 3 December 2014

Robocopy: Mirror Two Directories

Robocopy command to mirror two directories:

robocopy "X:\Dir" "Y:\Dir" /B /E /COPYALL /DCOPY:T /R:1 /MIR /TEE /LOG:C:\Robocopy.log /NP

/B : Copy files in Backup mode.
/E : Copy subfolders, including empty subfolders.
/COPYALL : Copy all attributes.
/DCOPY:T : Copy directory timestamps.
/R:n : Number of retries.
/MIR : Mirror a directory tree (equivalent to /PURGE plus all subfolders /E) and updates directory security.
/TEE : Output to console window, as well as the log file.
/LOG : Output to log file.
/NP : No Progress - suppress % copied.

No comments:

Post a comment