Robocopy

Robocopy #

Below outlines the basic command structure for using Robocopy to copy files within a Windows environment.

robocopy “<source>” “<destination” /E /R:2 /W:5 /COPY:DAT /LOG:"<log location>"
Argument Description
robocopy Windows Copy Command-line Tool.
"<source>" The files you wish to copy.
"<Destination>" The folder you wish to copy your data too.
/E Copy subdirectories (including empty directories).
/R:2 The number of retries when a file fails to successfully copy.
/W:5 How long to wait inbetween retries for copies.
/COPY:DAT Copy the following attributes of the files/folders:
D: Data
A: Attributes
T: Timestamp
/LOG:"<log location>" Log all command output to verify.

A full Microsoft documentation about robocopy can be found at this link.