RoboCopy Swiches and Options

Copy Options Option Description

/S	copy Subdirectories, but not empty ones.


/E			copy subdirectories, including Empty ones.


/LEV:n			only copy the top n LEVels of the source directory tree.


/Z			copy files in restartable mode.


/B			copy files in Backup mode.


/ZB			use restartable mode; if access denied use Backup mode.


/J			copy using unbuffered I/O (recommended for large files).


/COPY:copyflag[s]	what to COPY for files (default is /COPY:DAT).

(copyflags : D=Data, A=Attributes, T=Timestamps, X=Skip alt data streams).

(S=Security=NTFS ACLs, O=Owner info, U=aUditing info).

/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.


/TIMFIX		FIX file TIMes on all files, even skipped files.


/PURGE		delete dest files/dirs that no longer exist in source.


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


/MOV			MOVe files (delete from source after copying).


/MOVE			MOVE files AND dirs (delete from source after copying).


/A+:[RASHCNET]	add the given Attributes to copied files.


/A-:[RASHCNET]	remove the given Attributes from copied files.


/CREATE		CREATE directory tree and zero-length files only.


/MON:n		MONitor source; run again when more than n changes seen.


/MOT:m		MOnitor source; run again in m minutes Time, if changed.


/RH:hhmm-hhmm	Run Hours – times when new copies may be started.


/MT[:n]  		Do multi-threaded copies with n threads (default 8). n must be at least 1 and not greater than 128.


This option is incompatible with the /IPG and /EFSRAW options.


/DCOPY:copyflag[s]	what to COPY for directories (default is /DCOPY:DA).


(copyflags : D=Data, A=Attributes, T=Timestamps, E=EAs, X=Skip alt data streams).


/NODCOPY		COPY NO directory info (by default /DCOPY:DA is done).


/NOOFFLOAD		copy files without using the Windows Copy Offload mechanism.


/COMPRESS		Request network compression during file transfer, if applicable.


/A			copy only files with the Archive attribute set.


/M			copy only files with the Archive attribute and reset it.


/IA:[RASHCNETO]	Include only files with any of the given Attributes set.


    R – Read-only


    A – Archive


    S – System


    H – Hidden


    C – Compressed


    N – Not content indexed


    E – Encrypted


    T – Temporary


/XA:[RASHCNETO]	eXclude files with any of the given Attributes set.


/XF file [file]…	 	eXclude Files matching given names/paths/wildcards.


/XD dirs [dirs]…	eXclude Directories matching given names/paths.


/XC			eXclude Changed files.


/XN			eXclude Newer files.


/XO			eXclude Older files.


/XX			eXclude eXtra files and directories.


/XL			eXclude Lonely files and directories.


/MAX:n		MAXimum file size – exclude files bigger than n bytes.


/MIN:n			MINimum file size – exclude files smaller than n bytes.


/MAXAGE:n		MAXimum file AGE – exclude files older than n days/date.


/MINAGE:n		MINimum file AGE – exclude files newer than n days/date.


/MAXLAD:n		MAXimum Last Access Date – exclude files unused since n.


/MINLAD:n		MINimum Last Access Date – exclude files used since n.


(If n < 1900 then n = n days, else n = YYYYMMDD date).


/DST			compensate for one-hour DST time differences.


/XJ			eXclude symbolic links (for both files and directories) and Junction points.


/XJD			eXclude symbolic links for Directories and Junction points.


/XJF			eXclude symbolic links for Files.


/IM			Include Modified files (differing change times).


/R:n			number of Retries on failed copies: default 1 million.


/W:n			Wait time between retries: default is 30 seconds.


/REG			Save /R:n and /W:n in the Registry as default settings.


/TBD			Wait for share names To Be Defined (retry error 67).


/LFSM			Operate in low free space mode, enabling copy pause and resume 


/LFSM:n[KMG]	/LFSM, specifying the floor size in n [K:kilo,M:mega,G:giga] bytes.


/RH:hhmm-hhmm	Specify the time between the job can run


/ZB			Copy files in restartable mode; restart the copy action in backup mode if access is denied. This will override files and folder permissions that might block access.


/MT:n			Multi-Threaded will speed up the file transfer, n = default 8


/IPG:n			Limit bandwidth usage by telling Robocopy to wait n milliseconds


/R:n			Specify the number of retries


/W:n			Specifies how long to wait between the retry


/LOG:<path>		Specify the log file to save the information to


/LOG+:  		Append the result to an existing log file


/ts			Include the source file time stamp in the log output


/tee			Output to log and console


/fp			Include the full path of the files in the log


/v			Verbose, output also skipped files