text stringlengths 0 4.23k |
|---|
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 |
Important |
If any data is copied from the root of a device, the destination directory will adopt the "hidden" attribute during the copy process. |
Parameters |
Parameter |
Description |
<source> |
Specifies the path to the source directory. |
<destination> |
Specifies the path to the destination directory. |
<file> |
Specifies the file or files to be copied. Wildcard characters (* or ?) are supported. If you don't specify this parameter, *.* is used as the default value. |
<options> |
Specifies the options to use with the robocopy command, including copy, file, retry, logging, and job options. |
<source> |
<destination> |
<file> |
*.* |
<options> |
Copy options |
Option |
Description |
/s |
Copies subdirectories. This option automatically excludes empty directories. |
/e |
Copies subdirectories. This option automatically includes empty directories. |
/lev:<n> |
Copies only the top n levels of the source directory tree. |
/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 recopying the entire file. |
/b |
Copies files in backup mode allowing Robocopy to override file and folder permission settings (ACLs). This allow copying of files you might otherwise not have access to assuming it's being run under an account with sufficient privileges. |
/zb |
Copies files in restartable mode. If file access is denied, switches to backup mode. |
/j |
Copies using unbuffered I/O (recommended for large files). |
/efsraw |
Copies all encrypted files in EFS RAW mode. |
/copy:<copyflags> |
Specifies which file properties to copy. The valid values for this option are:D - DataA - AttributesT - Time stampsX - Skip alt data streamsS - NTFS access control list (ACL)O - Owner informationU - Auditing informationThe default value for the /COPY option is DAT (data, attributes, and time stamps). The X flag is ignored if either /B or /ZB is used. |
/dcopy:<copyflags> |
Specifies what to copy in directories. The valid values for this option are:D - DataA - AttributesT - Time stampsE - Extended attributeX - Skip alt data streamsThe default value for this option is DA (data and attributes). |
/sec |
Copies files with security (equivalent to /copy:DATS). |
/copyall |
Copies all file information (equivalent to /copy:DATSOU). |
/nocopy |
Copies no file information (useful with /purge). |
/secfix |
Fixes file security on all files, even skipped ones. |
/timfix |
Fixes file times on all files, even skipped ones. |
/purge |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.