How to use Multiple Robocopy Commands – A Full List

Robocopy Commands: If you have been switching the computer quite often, you will find the Robocopy an excellent option for the purpose. The best backup and restore tool should be your one-stop solution for all your needs in file replication. Robocopy stands for Robust File Copy. Replacing the previously used XCopy functionality, the new file copy functionality will bring in new advanced functionality to the backup and restore needs you may have.

How Effective are the Robocopy tool and Robocopy Commands?

If you really care for the safety of your data, you would need to take extreme care of the backup tools that you use. While you may be using the default options on your Windows installation, you would also prefer the third party options for the best experience and safety of your files.

Robocopy offers you access to enhanced options in this context. There are over 80 Robocopy commands along with an equally powerful number of Robocopy Switches. This can be an excellent option for a robust data backup functionality.

robocopy commands

How to use Robocopy to Copy files on Your Windows Device?

Well, there are several Robocopy options for enhanced performance. Of course, you need to make use of the Robocopy commands to ease your copying and backup processes. Just make sure you have understood the Robocopy syntax properly and use the Robocopy options offered to you by the robust system.

Some of the examples for the right type of Robocopy commands would be the following –

Copy Directory

Robocopy D:\dir1\data E:\backup\data

This command will help you copy system files along with the hidden files as well. The above Robocopy Syntax will copy files from the D drive to the E drive from a particular directory.

Copy Directory Structure

Robocopy /S D:\dir1\data E:\backup\data

The above Robocopy command will copy the directory structure from the D drive to the E drive. It will perform a deep copy folder hierarchy and adds up data from all the subfolders.

Replicate access permission on the destination folder

robocopy /sec source folder destination folder

A few of the Robocopy options can be explained as in the following examples –

Robocopy does offer you an excellent set of options for your backup requirements. The following Robocopy options can be helpful in understanding the Robocopy syntax –

  • /S — Copy subdirectories except for the empty ones.
  • /E — Copy Subdirectories, including the empty ones.
  • /Z — Copy files in a restartable mode.
  • /ZB — Uses restartable 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 multithreaded copies with n threads (default is 8).

File Selection Options

/an only copies files with a set Archive attribute.

/m does the same as above. Additionally, it resets the attribute.

/ia:[RASHCNETO] includes just the files which have a specified attribute.

/xa:[RASHCNETO] excludes files with specific attributes.

/xf <FileName>[ …] excludes files that match the given paths, names, or wildcards.

/xd <Directory>[ …] Excludes folders that match the given paths and names.

/xc omits changed files.

/xn omits newer files.

/xo leaves out older files.

/xx leaves out extra folders and files.

/xl leaves out lonely folders and files.

/is is for including the same files.

/it is for Including altered or tweaked files.

/max:<N> sets maximum file size and omits files larger than the specified number of bytes.

/min:<N> sets minimum file size and leaves out files smaller than the specified number of bytes).

/maxage:<N> sets maximum file age and omits files created before a specified date or older than a certain number of days.

/minage:<N> sets minimum file age and omits files created after a specified date, or newer than a specified number of days).

/maxlad:<N> sets maximum last access date, leaving out files not used since the specified date).

/minlad:<N> sets minimum last access date, leaving out files accessed since. However, If N is set below 1900 N shows the day count. Otherwise, N shows a date in the standard YYYYMMDD format.

/xj makes an exclusion of junction points.

/fft estimates FAT file times (approx. two sec.)

Job Options

/job:<JobName> parameters will be taken from the specified job file.

/save:<JobName> parameters will be saved to the specified job file.

/quit quits upon the execution of the command line in order to check the parameters.

/nosd no source directory will be specified.

/nodd no destination directory will be specified.

In essence, Robocopy should be your one-stop solution for all your requirements in the robust backup solution. Make sure you master the Robocopy functionality in your Windows ecosystem, and you will be able to get the best ever experience.

More Related Posts:

Give a Comment