What is Robocopy in Windows?

Microsoft Windows’s file replication command is known as “Robust file copy” or simply called Robocopy. It uses the concept of timestamp and datestamp for incomplete file transfers, that help in tolerating network interruptions. It knows where to start from using that recovery record having the date/time stamp information. Robocopy eliminates the chance of failure as it skips NTFS junction points as NTFS happens to cause infinite loops. Robocopy replaces all other copy commands with multiple exceptional features. 
 

The concept used in Robocopy to copy multiple files simultaneously is multithreading. The usage of multithreading makes it much faster than standard copy and also Xcopy.  The basic syntax is: 

robocopy <Source> <Destination> [<File>[ ...]] [<Options>] 

Features: 

  • You can pre-specify what to do with conflicting file names.
  • You can exclude some files or folders.
  • You can schedule a copy and paste operation.
  • You can mirror 1 folder to another, deleting files in the destination that don’t exist in the source folder.

Here are a few copy options available to Robocopy: 
 



There are a lot more, please feel free to run Robocopy/? on your command prompt to explore more about it. 
 

Example: 

robocopy <Source> <Destination> /E

Here /E is used to copy sub-directories and folders along with files. 
 

Why one should know it? Well, you can write a Robocopy script to synchronize folders, you can make backup much faster and secured. It helps to transfer files over servers and a lot more. 

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.