/copy包含参数datsou比如:/copy:datsou(也可以用/copyall),表示将所有源文件夹的信息复制到目标文件夹中,其中D=文件数据,A=文件属性,T=时间信息,S=权限信息,O=所有者信息,U=审核信息。
/SEC :: copy files with SECurity (equivalent to /COPY:DATS).
/sec表示copy文件并带安全属性信息,等同于/copy:dats
/COPYALL :: COPY ALL file info (equivalent to /COPY:DATSOU).
/copyall等同于/copy:datsou
/NOCOPY :: COPY NO file info (useful with /PURGE).
/nocopy表示copy文件不附带任何属性信息
/PURGE :: delete dest files/dirs that no longer exist in source.
/MIR :: MIRror a directory tree (equivalent to /E plus /PURGE).
/FFT :: assume FAT File Times (2-second granularity).
/256 :: turn off very long path (> 256 characters) support.
/MON:n :: MONitor source; run again when more than n changes seen.
/MOT:m :: MOnitor source; run again in m minutes Time, if changed.
/mot后接的是时间(分钟),是指Robocopy执行操作的最短时间;/mon后接的是最少文件修改个数。在监视过程中,会自动记录时间和修改的次数,只有同时符合以上两个条件时,Robocopy才开始执行,执行完成后,这两个数据会自动清零,并重新开始监视文件夹,除非用户关闭命令提示符窗口或按下Ctrl+Break键.
/RH:hhmm-hhmm :: Run Hours - times when new copies may be started.
/RH:hhmm-hhmm指定Robocopy开始的时间段和结束时间段,在这个时间段外,拷贝会被暂停。时间为24小时格式,4个数字长,从0000到2359,而且两个数字不能相同
/PF :: check run hours on a Per File (not per pass) basis.
/IPG:n :: Inter-Packet Gap (ms), to free bandwidth on slow lines.
::
:: File Selection Options :
文件可选属性
::
/A :: copy only files with the Archive attribute set.
/M :: copy only files with the Archive attribute and reset it.
/XL :: eXclude Lonely files and directories.
/IS :: Include Same files.
/is文件相同,不做copy,但是文件的属性进行更新,经常和/copy一起结合使用比如:robocopy c:/windows/temp c:/windows/temp/downloads /is /copy:sou
/IT :: Include Tweaked files.
/MAX:n :: MAXimum file>
/MIN:n :: MINimum file>
/max:n /max:6000000表示仅复制不大于6000000bytes的文件,数值单位为byte。如果是/min:6000000,则复制不小于6000000bytes的文件。两个参数可以同时使用,界定复制文件大小的范围
/MAXAGE:n :: MAXimum file AGE - exclude files older than n days/date.
/MINAGE:n :: MINimum file AGE - exclude files newer than n days/date.
/maxage:n表示最远修改时间的文件,修改时间比这个还要旧的文件将不会被复制。/maxage:后可接数字,也可以接日期,数字小于1900时表示天数,否则就得用YYYYMMDD来表示具体的日期,如/maxage:20070110表示2007年1月10日后被修改的文件才允许复制。与之相对应的参数是/minage,表示最近修改时间,比这个时间新的文件将不被复制。
/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).
/XJ :: eXclude Junction points. (normally included by default).
::
:: Retry Options :
::
/R:n :: number of Retries on failed copies: default 1 million.
/r:n重试次数,当复制出错时,重新尝试复制的次数,默认时一百万次
/W:n :: Wait time between retries: default is 30 seconds.
/w:n表示当上次一重试复制失败后下一次开始的时间间隔,默认时30秒
/REG :: Save /R:n and /W:n in the Registry as default settings.
/reg 使用/reg以后,表示将/w:n /r:n一起结合使用,并取他们的默认参数值。
/TBD :: wait for sharenames To Be Defined (retry error 67).
::
:: Logging Options :
日志输出参数
::
/L :: List only - don't copy, timestamp or delete any files.
/X :: report all eXtra files, not just those selected.
/V :: produce Verbose output, showing skipped files.
/TS :: include source file Time Stamps in the output.
/FP :: include Full Pathname of files in the output.
/NS :: No>
/NC :: No>
/NFL :: No File List - don't log file names.
/NDL :: No Directory List - don't log directory names.
/NP :: No Progress - don't display % copied.
/np表示不显示copy进度,在robocopy里面进度大叫以%显示。
/ETA :: show Estimated Time of Arrival of copied files.
/eta总结复制过的文件花去的时间
/LOG:file :: output status to LOG file (overwrite existing log).
/LOG+:file :: output status to LOG file (append to existing log).
默认情况下,Robocopy的操作过程只是在命令提示符中显示,我们可以让它把操作过程输出为TXT文件,加上“/log:文件名.txt”即可
/TEE :: output to console window, as well as the log file.
/NJH :: No Job Header.
/NJS :: No Job Summary.
::
:: Job Options :
::
/JOB:jobname :: take parameters from the named JOB file.
/SAVE:jobname :: SAVE parameters to the named job file
/save:任务名 可以将当前操作记录为任务文件,通过 /job:任务名 就可以方便调用,不需要再输入一长串的命令了
/QUIT :: QUIT after processing command line (to view parameters).
/quit 命令行完成之后,退出程序
/NOSD :: NO Source Directory is specified.