Copies file data from one location to another with Robocopy

Robocopy is a command-line directory and/or file replication command for Microsoft Windows. Robocopy functionally replaces Xcopy. Developers by Microsoft.

robocopy c:\directorya d:\directoryz /MOV /IS /R:5 > "c:\directory A\Logfile.txt"

or

robocopy "c:\directory a" "d:\directory z" /MOV /IS /R:5 > "c:\directory A\Logfile.txt"

Copy options

OptionDescription
/movMoves files, and deletes them from the source after they are copied.
/isIncludes the same files.

Retry options

OptionDescription
/r:5Specifies the number of retries on failed copies. The default value of n is 1,000,000 (one million retries).

For more example, to copy two files from folder c:\dira to c:\dirz, the following syntax is used:

robocopy c:\dira c:\dirz file1.txt file2.pdf

And to copy all DB files from c:\dira to c:\dirz:

robocopy c:\dira c:\dirz *.db


For more information:

robocopy | Microsoft Docs

Robocopy – Wikipedia

Leave a Reply

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