我需要有关 RoboCopy 批处理文件的帮助。我有一个批处理文件来运行 RoboCopy 将文件从 server1 复制到 server2。我已包含 /XO 开关以仅复制新文件。
复制文件后,对复制的文件运行命令。复制过程正常,但命令失败。我不知道我在这里错过了什么。:(
我非常感谢这里专家的任何帮助。下面是我的批处理文件:
Robocopy 作业 C:\ROBOCOPY\JOB2.RCJ
由 User_Name 创建于 2013 年 5 月 6 日星期一 14:11:19
源目录:
/SD:\\Server1\Projects\MS480\RSL_PR1_Data\LOFILE\ :: Source Directory.
目标目录:
/DD:\\Server2\RoboCopy\Exp\ :: Destination Directory.
包括这些文件:
/IF :: Include Files matching these names
SystemOptions*.*
排除这些目录:
/XD :: eXclude Directories matching these names
:: eXclude no names (currently - Command Line may override)
排除这些文件:
/XF :: eXclude Files matching these names
:: eXclude no names (currently - Command Line may override)
/XO :: eXclude Older files.
复制选项:
/COPYALL :: COPY ALL file info (equivalent to /COPY:DATSOU).
/FFT :: assume FAT File Times (2-second granularity).
/ZB :: use restartable mode; if access denied use Backup mode.
重试选项:
/R:5 :: number of Retries on failed copies: default 1 million.
/W:5 :: Wait time between retries: default is 30 seconds.
记录选项:
/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.
/NP :: No Progress - don't display percentage copied.
/LOG:C:\Desktop\RoboCopy\Systemsoptions-LO-FILE.txt :: output status to LOG file (overwrite existing log).
/TEE :: output to console window, as well as the log file.
@echo off
RoboCopy /JOB:job1
SET file=SystemOptions*.*
FOR /f %file% in (C:\Desktop\RoboCopy\Systemsoptions-LO-FILE.txt) do CrCTool.exe
/f:%file% /a