我无法让 robocopy 的 /save 和 /job 选项正常工作。实际上 /save 选项似乎有效:
robocopy c:\temp c:\tmp *.out /save:c:\tmp\rob1 /L
-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows :: Version XP010
-------------------------------------------------------------------------------
Started : Wed Apr 03 11:36:48 2013
Source : c:\temp\
Dest : c:\tmp\
Files : *.out
Options : /L /COPY:DAT /R:1000000 /W:30
------------------------------------------------------------------------------
1 c:\temp\
*EXTRA File 188 cd.out
*EXTRA File 23126 dmidecode.out
*EXTRA File 3102 foo.out
------------------------------------------------------------------------------
Total Copied Skipped Mismatch FAILED Extras
Dirs : 1 0 1 0 0 0
Files : 1 0 1 0 0 3
Bytes : 1.0 k 0 1.0 k 0 0 25.7 k
Times : 0:00:00 0:00:00 0:00:00 0:00:00
Ended : Wed Apr 03 11:36:48 2013
但是,当我尝试使用刚刚生成的作业文件时,出现错误:
robocopy c:\temp c:\tmp *.out /job:c:\tmp\rob1 /L
Job File : C:\TMP\ROB1.RCJ
ERROR : Invalid Job File, Line #11 :"/SD:c:\temp\"
-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows :: Version XP010
-------------------------------------------------------------------------------
Started : Wed Apr 03 11:37:08 2013
Source - c:\temp\
Dest - c:\tmp\
Files : *.out
Options : /JOB /COPY:DAT /R:1000000 /W:30
------------------------------------------------------------------------------
ERROR : Invalid Parameter #4 : "/job:c:\tmp\rob1"
Simple Usage :: ROBOCOPY source destination /MIR
source :: Source Directory (drive:\path or \\server\share\path).
destination :: Destination Dir (drive:\path or \\server\share\path).
/MIR :: Mirror a complete directory tree.
For more usage information run ROBOCOPY /? or read Robocopy.Doc.
NOTE: Read "True Replication" in Robocopy.Doc prior to first use of /MIR !
**** /MIR can DELETE files as well as copy them !
为什么 robocopy 不能使用它刚刚创建的作业文件?