*** Welcome to piglix ***

Robocopy

Robocopy
Developer(s) Microsoft
Stable release
10.0 / 2015; 2 years ago (2015)
Operating system Windows NT 4 and later
License Freeware

Robocopy, or "Robust File Copy", is a command-line directory and/or file replication command. Robocopy functionally replaces Xcopy, with more options. It has been available as part of the Windows Resource Kit starting with Windows NT 4.0, and was first introduced as a standard feature in Windows Vista and Windows Server 2008. The command is robocopy.

Robocopy is noted for capabilities above and beyond the built-in Windows copy and xcopy commands, including the following:

Robocopy does not copy open files. Any process may open files for exclusive read access by withholding the FILE_SHARE_READ flag during opening. Even Robocopy's Backup mode will not touch those files. (Backup mode instead runs Robocopy as a "Backup Operator". This allows Robocopy to override permissions settings, specifically, NTFS ACLs). Normally Volume Shadow Copy Service is used for such situations, but Robocopy does not use it. Therefore, Robocopy is not useful for backing up live operating system volumes. However, one can use a separate utility, such as ShadowSpawn (Free, Open Sourced, and MIT Licensed) or GSCopyPro ($30 - $50) or DiskShadow.exe (included with Windows Server 2008), to create a shadow copy of a given volume, which Robocopy can then be directed to back up.

Robocopy versions on systems older than Windows Vista do not mirror properly. They ignore changed security attributes of previously mirrored files.

When specifying the /MT[:n] option to enable multithreaded copying, the /NP option to disable reporting of the progress percentage for files is ignored. By default the MT switch provides 8 threads. The n is the amount of threads you specify if you do not want to use the default.

The /XF switch does not work if given both a directory and a wildcard. For example, /XF pictures\*.jpg generates an error.

Here are some examples of usage. If more than one option is specified, they must be separated by spaces.


...
Wikipedia

...