Windows Robocopy Examples and Syntax

In this tutorial you will learn how to work Windows10 Robocopy command, and will show some useful Robocopy Examples.

Robocopy means: Robust File Copy for Windows.

Robocopy command will help you copy a large number of files very quickly. It works much faster than the standard Windows “copy”command.

Robocopy has great features as tolerate network interruptions and resume copy after network restoration.
Also it has multithreaded copying which is help to copy files much faster.

windows robocopy command

Robocopy Syntax

ROBOCOPY source destination options

source :: Source Directory (drive:\path or \server\share\path).
destination :: Destination Dir (drive:\path or \server\share\path).

Below you can see most useful options, for see all available options you can find by typing: Robocopy /?

/S :: copy Subdirectories, but not empty ones.
/E :: copy subdirectories, including Empty ones.

/Z :: copy files in restartable mode.

Always use /Z mode when you copyng files over network – incase of network interruption it will help resume copy process after network restoration

/B :: copy files in Backup mode.
/ZB :: use restartable mode; if access denied use Backup mode.
/SEC :: copy files with SECurity (equivalent to /COPY:DATS).
/COPYALL :: COPY ALL file info (equivalent to /COPY:DATSOU).
/NOCOPY :: COPY NO file info (useful with /PURGE).
/SECFIX :: FIX file SECurity on all files, even skipped files.
/PURGE :: delete dest files/dirs that no longer exist in source.
/MOV :: MOVe files (delete from source after copying).
/MOVE :: MOVE files AND dirs (delete from source after copying).
/MT[:n] :: Do multi-threaded copies with n threads (default 8). n must be at least 1 and not greater than 128.

/MIR :: MIRror a directory tree (equivalent to /E plus /PURGE).

Robocopy Examples of Use

Example 1

Copy all DirectoryA contents to DirectoryB with file attributes and empty directories:

C:> Robocopy C:\DirectoryA C:\DirectoryB /E
Robocopy Example of Use

Example 2

Mirror DirectoryA with network Server in local network in resume mode if network connection is lost (/Z)

C:> Robocopy C:\DirectoryA \Server\Backup /MIR /Z

   

If you like what you are reading, please:

Buy me a coffeeBuy me a coffee
Summary
Windows Robocopy Examples and Syntax
Article Name
Windows Robocopy Examples and Syntax
Description
How to work Windows10 Robocopy command, and will show some useful Robocopy Examples. Robocopy can copy a large number of files quickly.
Author
Publisher Name
ARSTECH
Publisher Logo

arstech

Leave a Reply

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