TechSide - Robocopy Command Line

Robocopy Command Line Tutorial

For: Windows

In an earlier blog entry, I showed you how to use Xcopy. This time I will show you an even more powerful Command(CMD) line utility called Robocopy, which is short for “Robust File Copy”. The Robocopy command line utility has even more advanced options (or switches), and was apparently released to replace Xcopy in newer Windows versions. I’m running Windows 10 and I have Xcopy commmand line and Robocopy commmand line, pre-installed on both of my Windows machines.

…[Robocopy Command Line] strengths include the ability to copy all NTFS file attributes and to mirror the contents of an entire folder hierarchy across local volumes or over a network.

Robocopy Command Line Syntax

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

To see the full list of options, type robocopy /? in the command prompt. The syntax of robocopy command line is different from other copy commands in that it accepts folder names as its source and destination — meaning you cannot use *.* or ?. However, certain files can be selected. If we want to copy a file named myinfo.txt from C:\draft” to “C:\published” then we can run the following command:

robocopy c:\draft c:\published myinfo.txt

Robocopy Command Line Key Features

robocopy command line syntaxGood Robocopy command line picture

Continue reading

XCOPY usage - quickly copy files in Windows

“XCOPY” stands for Extended Copy, and was created to add more functions then the standard copy command. If you are using Windows, it should be installed already.

XCOPY is a command used on PC DOS, MS-DOS, OS/2, Microsoft Windows, and related operating systems for copying multiple files or entire directory trees from one directory to another and for copying files across a network. — Wikipedia

Xcopy copies multiple files and folders and can create the same structure to the copied location. (Something the copy command cannot do.)

Syntax:

xcopy Source [Destination] [/w] [/p] [/c] [/v] [/q] [/f] [/l] [/g] [/d[:mm-dd-yyyy]] [/u] [/i] [/s [/e]] [/t] [/k] [/r] [/h] [{/a|/m}] [/n] [/o] [/x] [/exclude:file1[+[file2]][+[file3]] [{/y|/-y}] [/z]

Continue reading