Robocopy: Difference between revisions

Content deleted Content added
Features: Robocopy /Z option is the same as XCOPY /Z, so I just removed that from the list of features 'not Windows commands'
m remove random letters, and rogue closing parentheses
 
(9 intermediate revisions by 6 users not shown)
Line 20:
Robocopy provides features not found in the built-in Windows [[copy (command)|COPY]] and [[XCOPY]] commands, including the following:
 
* Recovering from temporary loss of network connectivity (Incomplete files are marked with a date stamp of 1970-01-01 and contain a recovery record so Robocopy knows where to continue from).
* Detecting and skipping [[NTFS junction point]]s, which, under certain circumstances, may cause copying failures because of infinite loops (with the <code>/XJ</code> switch).
* Preserving any combination of the following: file contents, attributes, metadata (e.g., original timestamps), NTFS [[Access Control List|ACL]]s (DACLs, SACLs, and owner). For example, it is possible to copy ACLs from one file to another. Before version XP026, however, this capability was limited to files only, not folders.ps).
* Utilizing the [[Windows NT]] "Backup Files and Directories" privilege (<code>SeBackupPrivilege</code>, normally not available to standard user accounts) to bypass NTFS ACLs that would otherwise impede transfer (requires the <code>/B</code> switch).<ref>{{cite web | url = http://theether.net/download/Microsoft/Utilities/robocopy.pdf | title = Robocopy.exe - Robust File Copy Utility - Version XP010 | publisher = [[Microsoft]] | year = 2003 | quote = 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. }}
</ref><ref>{{cite web | url = http://technet.microsoft.com/en-us/library/cc756898(v=ws.10).aspx | title = Default groups | date = 6 June 2011 | publisher = Microsoft | quote = Backup Operators [...] Members of this group can back up and restore all files [...], regardless of their own individual permissions on those files. }}</ref>
* Persistence by default, with a programmable number of automatic retries if a file cannot be copied.
* The mirror mode, which keeps two directory trees synchronized by also deleting files in the destination that are not present in the source.
Line 30 ⟶ 31:
* Support for paths exceeding 259 characters, up to a theoretical limit of about 32,000 characters.<ref>{{cite web|url=http://www.windowsitpro.com/content1/topic/robocopy-xp010-faq/catpath/migration/page/2|title=Robocopy XP010 FAQ|last=Lewis|first=Dick|date=15 November 2004|website=Windows IT Pro|publisher=Penton Media|page=2|archive-url=https://web.archive.org/web/20121009110523/http://www.windowsitpro.com/content1/topic/robocopy-xp010-faq/catpath/migration/page/2|archive-date=9 October 2012|url-status=dead}}</ref>
* Multithreaded copying (introduced with [[Windows 7]] and [[Windows Server 2008 R2]]).<ref>{{cite web |last1=Holliday |first1=Grant |title=Multi-threaded robocopy for faster copies |url=https://blogs.msdn.microsoft.com/granth/2009/12/07/multi-threaded-robocopy-for-faster-copies/ |website=Grant Holliday's Blog |publisher=[[Microsoft]] |archive-url=https://web.archive.org/web/20180813013804/https://blogs.msdn.microsoft.com/granth/2009/12/07/multi-threaded-robocopy-for-faster-copies/ |archive-date=13 August 2018 |date=7 December 2009 |url-status=dead}}</ref>
* Return codes (used in automation).<ref>{{cite web|url=https://learn.microsoft.com/en-US/troubleshoot/windows-server/backup-and-storage/return-codes-used-robocopy-utility |title=Return codes that are used by the Robocopy utility in Windows Server 2008 or Windows Server 2008 R2 |website=Windows Server troubleshooting |via=[[Microsoft Learn]] |publisher=[[Microsoft]] |date=23 February 2023 |firstfirst1=Han |lastlast1=Liang |first2=Lucy |last2=Zou |first3=Simonx |last3=Xu}}</ref>
 
===Compression===
Since [[Windows Server 2019]] and [[Windows 10]], Robocopy supportsupports [[Server Message Block|SMB]] compression for transferring files across a network. If the <code>/compressioncompress</code> is specified, the destination computer supports SMB compression, and the files being copied are compressible, the operation enjoys significant performance improvements. The SMB compression adds inline whitespace compression to file transfers. Compression is also available with the <code>[[XCOPY]]</code> command and [[Hyper-V]] [[live migration]] with SMB.<ref>{{Cite web |title=RoboCopy supports Copying Files over SMB with Compression on Windows Server 2019, and beyond |first=Sander |last=Berkouwer |website=dirteam.com |date= 7 September 2020|access-date=14 February 2021 |url= https://dirteam.com/sander/2020/09/07/robocopy-supports-copying-files-over-smb-with-compression-on-windows-server-2019-and-beyond/ }}</ref><ref>{{Cite web |title=SMB Compression Lowers Bandwidth and Improves Copy Times in Windows Server and Azure|last=Smith |first=Russell |work=Petri |date=27 November 2020 |url= https://petri.com/smb-compression-lowers-bandwidth-and-improves-copy-times-in-windows-server-and-azure}}</ref>
 
==Examples of use==
Line 92 ⟶ 93:
| title = CreateFile function
| website = Windows App Development
| viadate = [[Microsoft9 Learn]]February 2023
| via = [[Microsoft Learn]]
| publisher = Microsoft
| quote = 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.
Line 104 ⟶ 106:
| url = http://technet.microsoft.com/library/cc772172(v=ws.10).aspx
| title = Diskshadow
| publisherdate = Microsoft18 TechNetApril 2012
| publisher = Microsoft TechNet
| quote = DiskShadow.exe is a tool that exposes the functionality offered by the Volume Shadow Copy Service (VSS).
| access-date = 2013-03-06
Line 116 ⟶ 119:
Although Robocopy itself is a command-line tool, [[Microsoft TechNet]] provided 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.<ref>{{cite news |author=Joshua Hoffman|title=Utility Spotlight Robocopy GUI|url=https://technet.microsoft.com/en-us/magazine/cc160891.aspx|work=TechNet Magazine|publisher=Microsoft Corporation and CMP Media, LLC|date= November 2006|access-date=2008-07-17 }}</ref> It included a copy of Robocopy version XP026. It is no longer available from Microsoft, but may be downloaded from the [[Internet Archive]]'s [[Wayback Machine]].<ref>{{cite web |title=Is Microsoft's Robocopy GUI still available |url=https://www.tenforums.com/software-apps/176362-microsofts-robocopy-gui-still-available.html |website=Windows TenForums |access-date=2 May 2022}}</ref>
 
There are non-Microsoft GUIs for Robocopy:
Ken Tamaru of Microsoft developed a copying program with functionality similar to Robocopy, called [[RichCopy]], discontinued in 2010. It is not based on Robocopy, and does not require .NET Framework.<ref>{{cite news |first=Joshua |last=Hoffman |title=Free Utility: RichCopy, an Advanced Alternative to RoboCopy |url=https://technet.microsoft.com/en-us/magazine/2009.04.utilityspotlight.aspx |work=TechNet Magazine|publisher=Microsoft Corporation and CMP Media, LLC|date= November 2006|access-date=2008-07-17 }}</ref>
* RoboCopy GUI by PC Assist Software v3.0 (includes job scheduling) (April 19, 2024) <ref>{{Cite web |last=Rose |first=Darren |title=PC Assist Software - RoboCopy GUI |url=https://www.pcassistsoftware.co.uk/robocopygui.html |access-date=2024-03-08 |website=www.pcassistsoftware.co.uk}}</ref>
* Cinchoo's ChoEazyCopy, Simple and powerful RoboCopy GUI v2.0.0.1 (March 11, 2022)<ref>{{Cite web |title=Cinchoo's ChoEazyCopy |author=Cinchoo |website=GitHub |date=11 March 2022 |url= https://github.com/Cinchoo/ChoEazyCopy/releases/}}</ref>
* "Easy RoboCopy", latest version 1.0.16 released on January 11, 2022.<ref>{{cite web|url=http://www.tribblesoft.com/home-page/easy-robocopy/ |title=Easy RoboCopy |publisher=TribbleSoft |access-date=2022-05-02}}</ref>
* "WinRoboCopy" revision 1.3.5953.40896 released on April 19, 2016.<ref>{{cite web|url=http://www.upway2late.com/projects/winrobocopy |title=WinRoboCopy - UpWay2Late.com Software |publisher=Upway2late.com |access-date=2012-11-11}}</ref>
* RoboCop RoboCopy, Robocopy GUI Skin and script generator with Progress Monitoring, 10 September 2015.<ref>{{Cite web |title=RoboCop RoboCopy |author=turnssoft |website=SourceForge |date=10 September 2015 |url= https://sourceforge.net/projects/robocoprobocopy/}}</ref>
* A program by SH-Soft, also called "Robocopy GUI" v1.0.0.24 (October 8, 2005).<ref>{{cite web|url=https://www.sh-soft.com/en/tools/robocopy-gui/index.html |title=SH-RoboCopy GUI |publisher=SH-Soft |access-date=2012-11-23}}</ref>
Ken Tamaru of Microsoft developed a copying program with functionality similar to Robocopy, called [[RichCopy]], this was discontinued in 2010. It is not based on Robocopy, and does not require .NET Framework.<ref>{{cite news |last=Hoffman |first=Joshua |lastdate=HoffmanNovember 2006 |title=Free Utility: RichCopy, an Advanced Alternative to RoboCopy |url=https://technet.microsoft.com/en-us/magazine/2009.04.utilityspotlight.aspx |access-date=2008-07-17 |work=TechNet Magazine |publisher=Microsoft Corporation and CMP Media, LLC|date= November 2006|access-date=2008-07-17 }}</ref>
 
==Versions==
Line 171 ⟶ 181:
==External links==
{{Wikibooks|Guide to Windows Commands}}
* Official sourcesdocumentation
** [https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy Microsoft Robocopy documentation]
** [https://technet.microsoft.com/en-us/library/cc733145(WS.10).aspx Robocopy short documentation] on Microsoft TechNet Library
**[http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en Robocopy download] (Version XP010) as part of Windows Server 2003 Resource Kit Tools. Includes 35-page documentation "robocopy.doc".
* Official downloads
**[https://technet.microsoft.com/en-us/library/cc733145(WS.10).aspx Robocopy short documentation] on Microsoft TechNet Library
** [http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en Robocopy download] (''Download no longer available'') (Version XP010) as part of Windows Server 2003 Resource Kit Tools. Includes 35-page documentation "robocopy.doc".
** [https://technet.microsoft.com/en-us/magazine/2006.11.utilityspotlight.aspx Robocopy GUI download] (''Download no longer available'') (Version 3.1.2.0) on Microsoft TechNet Magazine
* Other
**[http://ss64.com/nt/robocopy.html ROBOCOPY.exe (XP Resource Kit/Standard Vista command)]