在此先感谢您的帮助。为什么? ROBOCOPY:错误32(0x00000020)访问目标目录。该进程无法访问该文件,因为它正在被另一个进程使用
我正在使用ROBOCOPY
将一些文件从驱动器复制到另一台计算机上。每过一段时间,我都会遇到一个错误。而不是像它应该重试999次,它重试一次并失败。我有几个问题:
为什么会在第一个地方发生这个错误?
为什么不是
ROBOCOPY
重试定义的999次?
命令低于:
mkdir C:\Users\tempuser\AppData\Local\temp\test1
robocopy /R:999 /W:5 /NP /E /XO /NFL /NDL E:\test1 C:\Users\tempuser\AppData\Local\temp\test1 test*
------------------------------------------------------------------------------- ROBOCOPY :: Robust File Copy for Windows ------------------------------------------------------------------------------- Started : Monday, March 25, 2013 4:20:51 AM Source : E:\test1 Dest : C:\Users\tempuser\AppData\Local\temp\test1 Files : test* Options : /NDL /NFL /S /E /DCOPY:DA /COPY:DAT /NP /XO /R:999 /W:5 ------------------------------------------------------------------------------ 2013/03/25 04:20:51 ERROR 32 (0x00000020) Accessing Destination Directory C:\Users\tempuser\AppData\Local\temp\test1 The process cannot access the file because it is being used by another process. Waiting 5 seconds... Retrying... ------------------------------------------------------------------------------ Total Copied Skipped Mismatch FAILED Extras Dirs : 1 0 0 0 1 0 Files : 0 0 0 0 0 0 Bytes : 0 0 0 0 0 0 Times : 0:00:05 0:00:00 0:00:05 0:00:00 Ended : Monday, March 25, 2013 4:20:56 AM
这不是一个答案。这是一条评论。 ROBOCOPY有哪些缺陷?我建议使用handle.exe或一些进程ID工具来测试目标目录是否被另一个实际进程ID使用,并且我认为它是SQL Server代理。 – Fandango68 2017-08-29 02:21:47