Developer(s) | Microsoft |
---|---|
Initial release | 1996, 23–24 years ago |
Stable release | |
Operating system | Windows NT 4 and later |
Type | Command |
License | Freeware |
Robocopy, or 'Robust File Copy', is a command-line directory and/or file replication command for Microsoft Windows. Robocopy functionally replaces Xcopy, with more options. First released as part of the Windows NT 4.0Resource Kit, it has been a standard feature of Windows since Windows Vista and Windows Server 2008. The command is robocopy.
Robocopy (Robust File Copy) is a command-line tool built into Windows 10, but it’s been around for years, and it’s a powerful and flexible tool to migrate files extremely fast. In this guide, you’ll learn the steps to use Robocopy to quickly transfer a lot of files over the network on Windows 10.
Robocopy is noted for capabilities above and beyond the built-in Windows copy and xcopy commands, including the following, some requiring appropriate command-line options:
/XJ
)/COPYALL
or /COPY:
command line switches./DCOPY:T
), even with the ability to update folder timestamps (copied from existing folders) on folders already created from previous versions (that did not copy the folder date and timestamps)./B
) so an administrator may copy an entire directory, including files denied readability to the administrator.Here are some examples of usage. If more than one option is specified, they must be separated by spaces.
Directory_A
to Directory_B
(including file data, attributes and timestamps), recursively with empty directories (/E
):Robocopy C:Directory_A C:Directory_B /E
/E
), copy all file information (/COPYALL
, equivalent to /COPY:DATSOU
, D
=Data, A
=Attributes, T
=Timestamps, S
=Security=NTFSACLs, 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
/MIR
), copy files in resume mode (/Z
) in case network connection is lost:Robocopy C:A backupserverB /MIR /Z
If directory names have non-standard characters, such as spaces, they can be put in double quotes (as usual in command-line commands).
For the full reference, see the Microsoft TechNet Robocopy page.[4]
Robocopy syntax is markedly different from its predecessors (copy and xcopy), in that it accepts only folder names, without trailing backslash, as its source and destination arguments. File names and wildcard characters (such as *
and ?
) are not valid as source or destination arguments; files may be selected or excluded using the optional 'file' filtering argument (which supports wildcards) along with various other options.[5]
For example, to copy two files from folder c:bar
to c:baz
, the following syntax is used:
And to copy all PDF files from c:bar
to c:baz
:
The files named are copied only from the folder selected for copying; fully qualified path names are not supported.
Robocopy outputs to the screen, or optionally to a log file, all the directories it encounters, in alphabetical order. Each directory is preceded by the number of files in that directory that fulfill the criteria for being copied. If the directory does not yet exist in the target, it is marked 'New Dir'. But if the directory is empty and the /E option is not used, or it contains no files meeting the criteria, a new directory will not be created.
If the /NFL (no file names in log) option is not used, the files being copied will be listed after the name of the directory they are in. Android emulator mac cordova.
Tccmebius 50W 5-Port USB. Tccmebius 50W 5-Port USB. Category MORE HDD Docking station Hard Drive Enclosure Cell Phones & Accessories Consumer Electronics Mini USB Connectors Mouse Pad. Case MORE Products MORE About Us. Brand: WANLONGXINColor: Red and BlackFeatures: Compatible with 2.5'/3.5' IDE/SATA I/II/III hard drive,Maximum support 8TB SATA interface hard disk, IDE interfaces maximum support 1TB hard drive (Not compatible with Western Digital IDE hard drive). Product is compatible with Windows XP / Vista / 7/8 / 8.1 / 10 (32/64 bi.
At the end of the output is a table giving numbers of directories, files, and bytes. For each of these, the table gives the total number found in the source, the number 'copied' (but this includes directories marked 'New Dir' even if they are not copied), the number 'skipped' (because they already exist in the target), and the number of 'mismatches', 'FAILED', and 'extras'. 'Failed' can mean that there was an I/O error that prevented a file being copied, or that access was denied. There is also a row of time taken (in which the time spent on failed files seems to be in the wrong column).
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).
FILE_SHARE_READ
[6] 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).[7][8] Normally Volume Shadow Copy Service is used for such situations, but Robocopy does not use it. Consequently, Robocopy is not suitable for backing up live operating system volumes. However,a separate utility such as ShadowSpawn
[9] (Free, Open Sourced, and MIT Licensed) or GSCopyPro
[10] ($30 - $50) or DiskShadow.exe
[11] (included with Windows Server 2008), can be used beforehand to create a shadow copy of a given volume, which Robocopy can then back up./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 number of threads you specify if you do not want to use the default.[14]Although Robocopy itself is a command-line tool, Microsoft TechNet provides a GUI front-end called Robocopy GUI. It was developed by Derk Benisch, a systems engineer with the MSN Search group at Microsoft, and required .NET Framework 2.0.[15] It includes a copy of Robocopy version XP026.
There are other non-Microsoft GUIs for Robocopy:
Ken Tamaru of Microsoft has 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.[19]
Several versions of Robocopy do not report the version number when executing robocopy /?
on the command line. However, their version is stored inside the executable itself and can be queried with PowerShell for example (gcm robocopy fl *
) or inside Windows Explorer by right-clicking on Robocopy.exe, selecting Properties, then clicking on the Details tab.
Product version | File version | Year | Origin | Other |
---|---|---|---|---|
1.54 | - | 1996 | Windows NT 4.0 Resource Kit | © 1996 |
1.70 | - | 1997 | Windows NT Resource Kit | |
1.71 | 4.0.1.71 | 1997 | Windows NT Resource Kit | |
1.95 | 4.0.1.95 | 1999 | Windows 2000 Resource Kit | |
1.96 | 4.0.1.96 | 1999 | Windows 2000 Resource Kit | © 1995-1997 |
XP010 | 5.1.1.1010 | 2003 | Windows 2003 Resource Kit | |
XP026 | 5.1.2600.26 | 2005 | Downloaded with Robocopy GUI v.3.1.2; /DCOPY:T option introduced | |
XP027 | 5.1.10.1027 | 2008 | Bundled with Windows Vista, Server 2008, Windows 7, Server 2008r2 | © 1995-2004 |
6.1 | 6.1.7601 | 2009 | KB2639043 | © 2009 |
6.2 | 6.2.9200 | 2012 | Bundled with Windows 8 | © 2012 |
6.3 | 6.3.9600 | 2013 | Bundled with Windows 8.1 | © 2013 |
10.0 | 10.0.10240.16384 | 2015 | Bundled with Windows 10 | © 2015 |
10.0.16299 | 10.0.16299.15 | 2017 | Bundled with Windows 10 1709 | © 2017 |
10.0.17134 | 10.0.17134.1 | 2018 | Bundled with Windows 10 1803 | © 2018 |
10.0.17763 | 10.0.17763.1 | 2018 | Bundled with Windows 10 1809 | © 2018 |
10.0.18362 | 10.0.18362.1 | 2019 | Bundled with Windows 10 1903 | © 2019 |
FILE_SHARE_READ [..] Enables subsequent open operations on a file or device to request read access. Otherwise, other processes cannot open the file or device if they request read access.
Backup mode copies [..] enable you to copy some files as a Backup Operator that you would not be able to copy as a normal user.
Backup Operators [..] Members of this group can back up and restore all files [..], regardless of their own individual permissions on those files.
ShadowSpawn.exe is an open source MIT licensed tool that creates and manages shadow copies.
gscopypro.exe is a tool that works similar to robocopy but has the ability to copy open files.
DiskShadow.exe is a tool that exposes the functionality offered by the Volume Shadow Copy Service (VSS).
Wikibooks has a book on the topic of: Guide to Windows Commands |