From Wikipedia, the free encyclopedia - View original article
|Operating system||Windows NT 4 and later|
|This article's lead section may not adequately summarize key points of its contents. (November 2012)|
|Operating system||Windows NT 4 and later|
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.
/COPY:) Copying folder timestamps is also possible in later versions (
/B) so an administrator may copy an entire directory, including files denied readability to the administrator.
Robocopy will 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). )
The Windows 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 GSCopyPro 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.
When specifying the
/MT[:n] option to enable multithreaded copying, the
/NP option to disable reporting of the progress percentage for files is ignored.
/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.
B(including file data, attributes and timestamps), recursively with empty directories (
Robocopy C:\A C:\B /E
/E), copy all file information (
/COPYALL, equivalent to
S=Security=NTFS ACLs, O=Owner info, U=aUditing info), do not retry locked files (
/R:0)(the number of retries on failed copies default value is 1 million), preserve original directories' Timestamps (
/DCOPY:T- requires version XP026 or later):
Robocopy C:\A C:\B /COPYALL /E /R:0 /DCOPY:T
Robocopy C:\A \\backupserver\B /MIR /Z
For the full reference, see the Microsoft TechNet Robocopy page.
Robocopy syntax is markedly different from standard copy commands, as it accepts only folder names as its source and destination arguments. File names and wild-card characters (such as "*.*") are not valid source or destination arguments. Files may be selected or excluded using the optional filespec filtering argument. Filespecs can only refer to the filenames relative to the folders already selected for copying. Fully qualified path names are not supported.
For example, in order to copy the file foo.txt from directory c:\bar to c:\baz, one could use the following syntax:
Robocopy c:\bar c:\baz foo.txt
Robocopy's "inter-packet gap" (IPG) option allows some control over the network bandwidth used in a session. In theory, the following formula expresses the delay (D, in milliseconds) required to simulate a desired bandwidth (BD, in kilobits per second), over a network link with an available bandwidth of BA kbps:
In practice however, some experimentation is usually required to find a suitable delay, due to factors such as the nature and volume of other traffic on the network. The methodology employed by the IPG option may not offer the same level of control provided by some other bandwidth throttling technologies, such as BITS (which is used by Windows Update and BranchCache).
Although Robocopy itself is a command-line tool, Microsoft TechNet provides a GUI front-end call Robocopy GUI. It was developed by Derk Benisch, a systems engineer with the MSN Search group at Microsoft, and required .NET Framework 2.0. It includes a copy of Robocopy version XP026.
There are other non-Microsoft GUIs for Robocopy:
Ken Tamaru of Microsoft has also developed a copying program similar to Robocopy, called RichCopy, which is available on Microsoft TechNet. While it is not based on Robocopy, it offers similar features, and it does not require .NET Framework. 
Note: Several versions of Robocopy do not show the version number when executing Robocopy /? on the command line.
|Product version||File version||Year||Origin||Other|
|1.70||-||1997||Windows NT Resource Kit|
|1.71||184.108.40.206||1997||Windows NT Resource Kit|
|1.95||220.127.116.11||1999||Windows 2000 Resource Kit|
|1.96||18.104.22.168||1999||Windows 2000 Resource Kit||© 1995-1997|
|XP010||22.214.171.1240||2003||Windows 2003 Resource Kit|
|XP026||5.1.2600.26||2005||Downloaded with Robocopy GUI v.3.1.2|
|XP027||126.96.36.1997||2008||Bundled with Windows Vista, Server 2008, Windows 7||© 1995-2004|
|6.2||6.2.9200||2012||Bundled with Windows 8||© 2012|
|6.3||6.3.9600||2013||Bundled with Windows 8.1||© 2013|