How to use Robocopy to transfer files

There are many ways to get a file from Point A to Point B on Windows. You can simply drag and drop with the GUI, use PowerShell and can also use a cmd command called robocopy.

While these are all good options, depending on the amount of data you need to transfer, using File Explorer, the process can take a long time. If you want to copy a lot of files faster and more reliably, you need a better solution, such as Robocopy.

The GUI is also fine if you’re only moving a few files, but for larger and more complex migrations, Robocopy is good way to go….

Robocopy (or Robust File Copy) for Windows is a useful utility built into Windows that allows you to efficiently copy or transfer one, 10 or 1,000,0000 files and folders all in one go. Not only can you copy/move files from one place to another, you can also sync folders destinations, too.

Robocopy command options explained

To get started with robocopy, open up a Windows command prompt or PowerShell and type robocopy /?. You are soon inundated with all of the options available:

Windows Robocopy Command with Examples To Copy Files In Safe Way

Robocopy has a lot of features that we can use to copy data faster, Below we’re using the most common options to make copy reliable and fast.

  • /S — Copy sub directories, but not empty ones.
  • /E — Copy Sub directories, including empty ones.
  • /Z — Copy files in restart able mode.
  • /ZB — Uses restart able mode, if access denied use backup mode.
  • /R:5 — Retry 5 times (you can specify a different number, default is 1 million).
  • /W:5 — Wait 5 seconds before retrying (you can specify a different number, the default is 30 seconds).
  • /TBD — Wait for share names To Be Defined (retry error 67).
  • /NP — No Progress – don’t display percentage copied.
  • /V — Produce verbose output, showing skipped files.
  • /MT:16 — Do multi threaded copies with n threads (By default is 8).

/MT, which is a feature that enables Robocopy to copy files in multithreaded mode, It means that Robocopy will try to copy eight files at the same time, but the tool supports 1 to 128 threads.


You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *