robocopy
Windows CMD · Files · available in the simulator
What it does
Robust file and directory copy; includes retry and mirroring capabilities.
Syntax
robocopy origen destino [archivo...] [opciones]
Options and parameters
/ECopies subdirectories, including empty ones.
robocopy origen destino /E/SCopies subdirectories, excluding empty ones.
/MIRMirrors a directory tree: copies and deletes destination files/directories not in source.
robocopy src dst /MIR/MOVMoves files, deleting them from the source after copying.
/MOVEMoves files and directories, deleting them from the source after copying.
/PURGEDeletes destination files and directories that no longer exist in the source.
/COPYSpecifies what file properties to copy: D Data, A Attributes, T Timestamps, S Security (NTFS ACL).
robocopy src dst /COPY:DAT/DCOPYSpecifies what directory properties to copy: D Data, A Attributes, T Timestamps.
/SECCopies files with security information; equivalent to /COPY:DATS.
/ZCopies files in restartable mode across network disconnects.
/BCopies files in backup mode using backup privileges.
/ZBUses restartable mode; if access is denied, uses backup mode.
/RSpecifies the number of retries on failed copies; default is 1,000,000.
robocopy src dst /R:2/WSpecifies the wait time between retries, in seconds.
robocopy src dst /R:2 /W:1/MTCopies using multiple threads in parallel.
robocopy src dst /MT:16/MAXExcludes files larger than the specified size in bytes.
/MINExcludes files smaller than the specified size in bytes.
/MAXAGEExcludes files older than the specified days or date.
/MINAGEExcludes files newer than the specified days or date.
/XFExcludes files matching the specified names or wildcards.
robocopy src dst /E /XF *.tmp/XDExcludes directories matching the specified names or paths.
robocopy src dst /E /XD node_modules/XJExcludes junction points.
/LOGWrites the status output to the log file, overwriting the existing file.
robocopy src dst /E /LOG:copia.log/LOG+Appends the status output to the existing log file.
/TEEWrites the status output to the console window, as well as to the log file.
/NPSpecifies that the percentage of copied files will not be displayed.
/NFLSpecifies that file names are not to be logged.
/NDLSpecifies that directory names are not to be logged.
/ETADisplays the estimated time of arrival of the copied files.
/FFTUses FAT file times (two-second granularity).
/IPGInter-packet gap in milliseconds, to free bandwidth on slow lines.
/JCopies using unbuffered I/O.
Usage examples
robocopy origen destino /Erobocopy src dst /MIR /R:2 /W:1robocopy src dst /MIRrobocopy src dst /COPY:DATrobocopy src dst /R:2robocopy src dst /R:2 /W:1robocopy src dst /MT:16robocopy src dst /E /XF *.tmprobocopy src dst /E /XD node_modulesrobocopy src dst /E /LOG:copia.log