{"id":223,"date":"2009-04-30T15:01:31","date_gmt":"2009-04-30T20:01:31","guid":{"rendered":"http:\/\/www.gamescheat.ca\/?p=223"},"modified":"2019-09-04T19:57:41","modified_gmt":"2019-09-05T00:57:41","slug":"robocopy-a-great-replacement-for-copy-and-xcopy","status":"publish","type":"post","link":"http:\/\/www.gamescheat.ca\/?p=223","title":{"rendered":"Robocopy a great replacement for copy and xcopy."},"content":{"rendered":"<p>Robocopy a saviour tool for the Server Administrators.  This is a great replacement for the old DOS copy and xcopy command which have many limitations.  That\u2019s not to say that these commands should be retired, I still used them regularly.  But when I need to copy a large directory with all the attributes intact, I use robocopy which can tolerate interruption to the network services.<\/p>\n<p>For those who are command line challanged, there is a GUI (graphical) version of Robocopy.  Please see my article for the GUI version of <a href=\"http:\/\/www.gamescheat.ca\/2009\/09\/robocopy-gui-makes-copying-files-across-the-network-easy-with-the-click-of-the-mouse\/\">Robocopy<\/a> here, http:\/\/www.gamescheat.ca\/2009\/09\/robocopy-gui-makes-copying-files-across-the-network-easy-with-the-click-of-the-mouse\/<\/p>\n<p>C:\\>robocopy help<\/p>\n<p>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014-<br \/>\n   ROBOCOPY     ::     Robust File Copy for Windows     ::     Version XP010<br \/>\n\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014-<\/p>\n<p>  Started : Thu Apr 30 16:00:09 2009<\/p>\n<p>   Source : C:\\help\\<br \/>\n     Dest \u2013<\/p>\n<p>    Files : *.*<\/p>\n<div style=\"float: left;\"><div style=\"margin: 15px 15px 15px 15px\";><script type=\"text\/javascript\"><!--\ngoogle_ad_client = \"pub-3319935785736004\";\ngoogle_alternate_color = \"FFFFFF\";\ngoogle_ad_width = 468;\ngoogle_ad_height = 60;\ngoogle_ad_format = \"468x60_as\";\ngoogle_ad_type = \"text_image\";\ngoogle_ad_channel =\"\";\ngoogle_color_border = \"cccccc\";\ngoogle_color_link = \"cc0000\";\ngoogle_color_bg = \"ffffff\";\ngoogle_color_text = \"000000\";\ngoogle_color_url = \"008000\";\n\/\/--><\/script>\n<script type=\"text\/javascript\"\n  src=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\n<\/script><\/div><\/div><p>  Options : *.* \/COPY:DAT \/R:1000000 \/W:30<\/p>\n<p>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<\/p>\n<p>ERROR : No Destination Directory Specified.<\/p>\n<p>       Simple Usage :: ROBOCOPY source destination \/MIR<\/p>\n<p>             source :: Source Directory (drive:\\path or \\\\server\\share\\path).<br \/>\n        destination :: Destination Dir  (drive:\\path or \\\\server\\share\\path).<br \/>\n               \/MIR :: Mirror a complete directory tree.<\/p>\n<p>    For more usage information run ROBOCOPY \/? or read Robocopy.Doc.<\/p>\n<p>NOTE: Read \u201cTrue Replication\u201d in Robocopy.Doc prior to first use of \/MIR !<br \/>\n****  \/MIR can DELETE files as well as copy them !<\/p>\n<p>C:\\>help robocopy<br \/>\nThis command is not supported by the help utility.  Try \u201cx \/?\u201d.<\/p>\n<p>C:\\>robocopy \/?<\/p>\n<p>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014-<br \/>\n   ROBOCOPY     ::     Robust File Copy for Windows     ::     Version XP010<br \/>\n\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014-<\/p>\n<p>  Started : Thu Apr 30 16:00:22 2009<\/p>\n<p>              Usage :: ROBOCOPY source destination [file [file]\u2026] [options]<\/p>\n<p>             source :: Source Directory (drive:\\path or \\\\server\\share\\path).<br \/>\n        destination :: Destination Dir  (drive:\\path or \\\\server\\share\\path).<br \/>\n               file :: File(s) to copy  (names\/wildcards: default is \u201c*.*\u201d).<\/p>\n<p>::<br \/>\n:: Copy options :<br \/>\n::<br \/>\n                 \/S :: copy Subdirectories, but not empty ones.<br \/>\n                 \/E :: copy subdirectories, including Empty ones.<br \/>\n             \/LEV:n :: only copy the top n LEVels of the source directory tree.<\/p>\n<p>                 \/Z :: copy files in restartable mode.<br \/>\n                 \/B :: copy files in Backup mode.<br \/>\n                \/ZB :: use restartable mode; if access denied use Backup mode.<\/p>\n<p>  \/COPY:copyflag[s] :: what to COPY (default is \/COPY:DAT).<br \/>\n                       (copyflags : D=Data, A=Attributes, T=Timestamps).<br \/>\n                       (S=Security=NTFS ACLs, O=Owner info, U=aUditing info).<\/p>\n<p>               \/SEC :: copy files with SECurity (equivalent to \/COPY:DATS).<br \/>\n           \/COPYALL :: COPY ALL file info (equivalent to \/COPY:DATSOU).<br \/>\n            \/NOCOPY :: COPY NO file info (useful with \/PURGE).<\/p>\n<p>             \/PURGE :: delete dest files\/dirs that no longer exist in source.<br \/>\n               \/MIR :: MIRror a directory tree (equivalent to \/E plus \/PURGE).<\/p>\n<p>               \/MOV :: MOVe files (delete from source after copying).<br \/>\n              \/MOVE :: MOVE files AND dirs (delete from source after copying).<\/p>\n<p>       \/A+:[RASHNT] :: add the given Attributes to copied files.<br \/>\n       \/A-:[RASHNT] :: remove the given Attributes from copied files.<\/p>\n<p>            \/CREATE :: CREATE directory tree and zero-length files only.<br \/>\n               \/FAT :: create destination files using 8.3 FAT file names only.<br \/>\n               \/FFT :: assume FAT File Times (2-second granularity).<br \/>\n               \/256 :: turn off very long path (> 256 characters) support.<\/p>\n<p>             \/MON:n :: MONitor source; run again when more than n changes seen.<br \/>\n             \/MOT:m :: MOnitor source; run again in m minutes Time, if changed.<\/p>\n<p>      \/RH:hhmm-hhmm :: Run Hours \u2013 times when new copies may be started.<br \/>\n                \/PF :: check run hours on a Per File (not per pass) basis.<\/p>\n<p>             \/IPG:n :: Inter-Packet Gap (ms), to free bandwidth on slow lines.<\/p>\n<p>::<br \/>\n:: File Selection Options :<br \/>\n::<br \/>\n                 \/A :: copy only files with the Archive attribute set.<br \/>\n                 \/M :: copy only files with the Archive attribute and reset it.<br \/>\n    \/IA:[RASHCNETO] :: Include only files with any of the given Attributes set.<br \/>\n    \/XA:[RASHCNETO] :: eXclude files with any of the given Attributes set.<\/p>\n<p> \/XF file [file]\u2026 :: eXclude Files matching given names\/paths\/wildcards.<br \/>\n \/XD dirs [dirs]\u2026 :: eXclude Directories matching given names\/paths.<\/p>\n<p>                \/XC :: eXclude Changed files.<br \/>\n                \/XN :: eXclude Newer files.<br \/>\n                \/XO :: eXclude Older files.<br \/>\n                \/XX :: eXclude eXtra files and directories.<br \/>\n                \/XL :: eXclude Lonely files and directories.<br \/>\n                \/IS :: Include Same files.<br \/>\n                \/IT :: Include Tweaked files.<\/p>\n<p>             \/MAX:n :: MAXimum file size \u2013 exclude files bigger than n bytes.<br \/>\n             \/MIN:n :: MINimum file size \u2013 exclude files smaller than n bytes.<\/p>\n<p>          \/MAXAGE:n :: MAXimum file AGE \u2013 exclude files older than n days\/date.<br \/>\n          \/MINAGE:n :: MINimum file AGE \u2013 exclude files newer than n days\/date.<br \/>\n          \/MAXLAD:n :: MAXimum Last Access Date \u2013 exclude files unused since n.<br \/>\n          \/MINLAD:n :: MINimum Last Access Date \u2013 exclude files used since n.<br \/>\n                       (If n < 1900 then n = n days, else n = YYYYMMDD date).\n\n                \/XJ :: eXclude Junction points. (normally included by default).\n\n::\n:: Retry Options :\n::\n               \/R:n :: number of Retries on failed copies: default 1 million.\n               \/W:n :: Wait time between retries: default is 30 seconds.\n\n               \/REG :: Save \/R:n and \/W:n in the Registry as default settings.\n\n               \/TBD :: wait for sharenames To Be Defined (retry error 67).\n\n::\n:: Logging Options :\n::\n                 \/L :: List only - don't copy, timestamp or delete any files.\n                 \/X :: report all eXtra files, not just those selected.\n                 \/V :: produce Verbose output, showing skipped files.\n                \/TS :: include source file Time Stamps in the output.\n                \/FP :: include Full Pathname of files in the output.\n\n                \/NS :: No Size - don't log file sizes.\n                \/NC :: No Class - don't log file classes.\n               \/NFL :: No File List - don't log file names.\n               \/NDL :: No Directory List - don't log directory names.\n\n                \/NP :: No Progress - don't display % copied.\n               \/ETA :: show Estimated Time of Arrival of copied files.\n\n          \/LOG:file :: output status to LOG file (overwrite existing log).\n         \/LOG+:file :: output status to LOG file (append to existing log).\n\n               \/TEE :: output to console window, as well as the log file.\n\n               \/NJH :: No Job Header.\n               \/NJS :: No Job Summary.\n\n::\n:: Job Options :\n::\n       \/JOB:jobname :: take parameters from the named JOB file.\n      \/SAVE:jobname :: SAVE parameters to the named job file\n              \/QUIT :: QUIT after processing command line (to view parameters).\n\n              \/NOSD :: NO Source Directory is specified.\n              \/NODD :: NO Destination Directory is specified.\n                \/IF :: Include the following Files.\n\n\n\n\nBelow is an excerpt from Wikipedia:\n\nFeatures\nRobocopy is notable for capabilities above and beyond the built-in Windows copy and xcopy commands, including the following:\n\nAbility to tolerate network outages and resume copying where it previously left off (incomplete files are noted with a date stamp corresponding to 1980-01-01 and contain a recovery record so Robocopy knows from where to continue). \nAbility to correctly copy attributes, owner information, alternate data streams, auditing information, and timestamps by default, without the need for numerous often forgotten command line switches. \nAbility to correctly copy NTFS ACLs, (when \/COPYALL provided), and to assert the Windows NT \"backup right\" (\/B) so an administrator may copy an entire directory, including files denied readability to the administrator. \nPersistence by default, with a programmable number of automatic retries if a file cannot be opened. \nA \"mirror\" mode, which keeps trees in sync by optionally deleting files out of the destination that are no longer present in the source. \nAbility to copy large numbers of files that would otherwise crash the built-in XCOPY utility. \nA progress indicator on the command line that updates continuously. \nNotably, Robocopy cannot copy open files that are in use by other users or applications. The so-called Backup mode is an administrative privilege that allows Robocopy to override permissions settings (specifically, NTFS ACLs) for the purpose of making backups. The Windows Volume Shadow Copy service is the only Windows subsystem that can copy open files while they are in use. Robocopy does not implement accessing the Volume Shadow Copy service in any way, inhibiting its usefulness as a backup utility for volumes that may be in use. However, one can use separate utilities such as VSHADOW or DISKSHADOW (included with Windows Server 2008) to create a shadow copy of a given volume with which to backup using Robocopy.\n\nOn the other hand, by design, the original Robocopy version is not able to replicate security attributes of files which have had their security permissions changed after an initial mirroring. [1] This behavior was fixed on Robocopy versions included in Windows 2008 and Windows Vista. The downside of this approach is that it means Robocopy does not behave consistently between different platforms. [2]\n\n\n[edit] GUI front-end\nAlthough Robocopy itself is a command-line tool, Microsoft Technet has also provided a <a href=\"http:\/\/www.gamescheat.ca\/?p=451\">GUI<\/a> front-end, the GUI requires the .NET Framework 2.0. It has been developed by Derk Benisch, a systems engineer with the MSN Search group at Microsoft.[3] Robocopy GUI also includes version XP026 of Robocopy (Vista version). When downloaded from the TechNet link below, the version reported is \u201cMicrosoft Robocopy GUI 3.1.2.\u201d When this version of RoboCopy is run, it then reports on its header:<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Robocopy a saviour tool for the Server Administrators. This is a great replacement for the old DOS copy and xcopy command which have many limitations. That\u2019s not to say that these commands should be retired, I still used them regularly.&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"http:\/\/www.gamescheat.ca\/?p=223\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[19],"tags":[25,63,23],"_links":{"self":[{"href":"http:\/\/www.gamescheat.ca\/index.php?rest_route=\/wp\/v2\/posts\/223"}],"collection":[{"href":"http:\/\/www.gamescheat.ca\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.gamescheat.ca\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.gamescheat.ca\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.gamescheat.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=223"}],"version-history":[{"count":15,"href":"http:\/\/www.gamescheat.ca\/index.php?rest_route=\/wp\/v2\/posts\/223\/revisions"}],"predecessor-version":[{"id":730,"href":"http:\/\/www.gamescheat.ca\/index.php?rest_route=\/wp\/v2\/posts\/223\/revisions\/730"}],"wp:attachment":[{"href":"http:\/\/www.gamescheat.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=223"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.gamescheat.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=223"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.gamescheat.ca\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}