2014-10-29 784 views
1

我有幾個任務使用Robocopy.exe,其中一個任務,我得到一個錯誤結果0X3但日誌文件不顯示任何錯誤。 下面是一個命令:計劃任務:錯誤0X3但日誌不會給出任何錯誤

ROBOCOPY \\X\L$\FORMATION \\Y\O$\FORMATION /MIR /sec /W:2 /R:5 /log:c:\O_journal.log 

我試圖啓動它沒有任務調度,它沒有螞蟻的錯誤的罰款。

我知道錯誤0X3是:ERROR_PATH_NOT_FOUND。但是日誌文件不顯示任何錯誤。

如果有人有任何線索或任何方法...

+0

我遇到了在Windows Server 2012R2域控制器上運行的腳本的相同問題。它可能與用於啓動計劃進程的用戶帳戶不在本地管理員組中。本地管理員組在域控制器上的工作方式稍有不同。我不是服務器管理員,所以我無法解釋爲什麼這很重要。我假設我的用戶帳戶不在導致我的問題的本地管理員組中,因爲Robocopy似乎已成功完成。 – 2015-11-24 17:10:04

回答

1

這是一個問題,對ROBOCOPY腳本配置的路徑。我已經通過將根目錄或主驅動器添加到源和目標來解決了此問題。

注:請確保您是管理員,這兩個服務器(源和目的地)

例子:

來源:「\\ 192.168.1.2 \ E $ \我的文件「

目的地: 」\\ 192.168.1.5 \ d $ \備份「

根目錄或主驅動器我已經提到的是如上所示的「e $」和「d $」。如果這不包含在您的腳本中,您將在計劃程序中遇到「0X3」錯誤,並且計劃程序將不起作用。

注意:此腳本用於將文件從源同步/複製到目標。

使用的參數。 /MIR /E /Z /R:5 /W:5

這是腳本的外觀作爲一個整體:

robocopy "\\\192.168.1.2\e$\my files" "\\\192.168.1.5\d$\backup" /MIR /E /Z /R:5 /W:5 

希望這可以幫助。

謝謝。

0

這是一個標準的行爲並且涉及從的Robocopy退出代碼:

0×00 0  No errors occurred, and no copying was done. 
       The source and destination directory trees are completely synchronized. 

0×01 1  One or more files were copied successfully (that is, new files have arrived). 

0×02 2  Some Extra files or directories were detected. No files were copied 
       Examine the output log for details. 

0×04 4  Some Mismatched files or directories were detected. 
       Examine the output log. Housekeeping might be required. 

0×08 8  Some files or directories could not be copied 
       (copy errors occurred and the retry limit was exceeded). 
       Check these errors further. 

0×10 16  Serious error. Robocopy did not copy any files. 
       Either a usage error or an error due to insufficient access privileges 
       on the source or destination directories. 

和它們的組合,即:×03 = 0×02 + 0×01

參見https://blogs.technet.microsoft.com/deploymentguys/2008/06/16/robocopy-exit-codes/爲完整的解釋。