• Home
  • Robocopy Syntax Commands
admin 23 February, 2018 0 Comments

The following will copy data and security for files that have been updated

robocopy "source" "destination" /E /ZB /DCOPY:T /COPYALL /R:1 /W:1 /V /MT:4

  • source :: Source Directory (drive:\path or \\server\share\path).
  • destination :: Destination Dir (drive:\path or \\server\share\path).
  • /E :: copy subdirectories, including Empty ones.
  • /ZB :: use restartable mode; if access denied use Backup mode.
  • /DCOPY:T :: COPY Directory Timestamps.
  • /COPYALL :: COPY ALL file info (equivalent to /COPY:DATSOU). Copies the Data, Attributes, Timestamps, Ownser, Permissions and Auditing info
  • /R:n :: number of Retries on failed copies: default is 1 million but I set this to only retry once.
  • /W:n :: Wait time between retries: default is 30 seconds but I set this to 1 second.
  • /V :: produce Verbose output, showing skipped files.
  • /MT:n :: multi-threaded, e.g. 4

PERMISSIONS

The following command will refresh file security for all files, without copying any file data.

ROBOCOPY /Mir "Source" "Target"
ROBOCOPY /E /Copy:S /IS /IT "Source" "Target"

Leave Comment