ROBOCOPY Commands

CAUTION: If you use the /MIR option it can be very destructful. A improper path or typo can delete files you need. USE WITH CAUTION!!!

Out of the box, I was unable to get it to copy folder and file permissions. Eventually stumbled across this command that worked. You can look up all the options on your own.

ROBOCOPY [SOURCE_DATA] [DESTINATION_DATA] /B /NOSD /NODD /E /V /TS /FP /COPYALL /W:1 /R:1 /XD "System Volume Information" "DfsrPrivate" /LOG:c:\robocopy.log /TEE

The options used in the command above are:

  • /B        copy in backup mode
  • /NOSD     indicates that no source directory is specified
  • /NODD     indicates that no destination directory is specified
  • /E        include empty subdirectories
  • /V        verbose
  • /TS       include source file timestamp in output
  • /FP       include full path in output
  • /COPYALL  copy all file info/security  DATSOU
  • /W:1      1 second between retries
  • /R:1      1 retry
  • /LOG:c:\robocopy.log   Log file creation
  • /TEE      output to console window too
  • /XD       Exclude Driectoryies - Seperated by spaces.

Use quotes if directory has spaces in its name.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s