Robocopy copy all files and folders command explained !

What is Robocopy

Robocopy (Robust File Copy) is a command with robust features compared to Copy and XCOPY commands.

So, in simple language, it’s a Files and Folder copy command.

Robocopy copy all files
Robocopy copy all files

Now, the question is all Microsoft OS supports robocopy? Not all!

Majorly earlier this utility comes with Windows Vista, Windows 2008, or any later Microsoft Windows Operating System.

Earlier it was a part of Windows Resource kit tools as a free-to-download utility.

Why Robocopy is better

You may question what is different in robocopy than Copy command or XCOPY Command.

Robocopy is designed for reliable copy or mirroring while maintaining the permission, attributes, owner information, timestamps, and properties of the objects copied.

Generally very useful in a very big chunk of data copying over the network. If connectivity breaks then it will

continue copying files from the last copy status and no need to restart the operation.

Copy all files and folders (directories/subdirectories)

Learn now practical way…

First thing basic robocopy command structure without switches.

Use: Copies file data from one location to another location.

robocopy <source> <destination> [<file name>[ ...]] [<options>] 

For example, to copy a file named yearly-report.mov from c:\reports to a file share \\marketing\videos.

While enabling multi-threading for higher performance (with the /mt parameter) and the ability to restart the transfer in case it’s interrupted (with the /z parameter), type:

robocopy c:\reports '\\marketing\videos' yearly-report.mov /mt /z
robocopy "source" "destination" /mt /z

/MT[:n]	  Creates multi-threaded copies with n threads. n must be an integer between 1 and 128. The default value for n is 8.
                  For better performance, redirect your output using /log option.
                  The /mt parameter can't be used with the /ipg and /efsraw parameters.

/z               Copies files in restartable mode. In restartable mode, should a file copy be interrupted, 
                  Robocopy can pick up where it left off rather than re-copying the entire file.
/s              Copies subdirectories. This option automatically excludes empty directories.

/e             Copies subdirectories. This option automatically includes empty directories.

/mov       Moves files, and deletes them from the source after they are copied.

/move     Moves files and directories, and deletes them from the source after they are copied.

Let's comment below how is the article ? You can refer our --> detailed and ultimate guide on robocopy .


How to use robocopy

How to use robocopy

1. Click on Windows Search Box and Write ” Command Prompt”
2. After opening Command Prompt type robocopy /? for detailed robocopy command options
3. For Copy normal Files and Folders use,

robocopy <source> <destination> [<file name>[ …]] [<options>]

Example : robocopy c:\reports ‘\\marketing\videos’ yearly-report.mov /mt /z

What is XD in robocopy

robocopy /xd

XD terms for excluding directories. So when we use robocopy /xd command it will copy files only and exclude directories from the source path.

Xxcopy vs robocopy

xxcopy vs robocopy

The answer is there is no such command like xxcopy available still now. People can rename the xcopy.exe file as an xxcopy and use all switches and parameters of xcopy command . I know this is not that much of easy because permission issues will be there but still you can !

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.