0
我试图使用命令行脚本将dll复制到服务器上。但是,由于它表示该文件正在使用中,因此我被阻止。这虽然没有意义,因为在我的脚本中,我将该文件复制到新位置,然后将NEW文件复制到服务器;新文件刚刚被创建,所以它如何被使用?我该如何将我的文件复制到服务器?robocopy错误32:无法复制我刚刚创建的文件
if exist \\10.1.1.1\c$ net use \\10.1.1.1\c$ /delete
net use Z: \\10.1.1.1\c$ [email protected] /user:mdomain\username
:: first copy files to a temp directory
xcopy C:\dev\Filepath C:\dev\TempFiles\ /E /C /H /R /K /O /Y
:: then copy files from temp directory to server
robocopy "C:\dev\TempFiles" "Z:\Program Files (x86)\Insite Software\Commerce Integration Service V3.7.1.16264" MSD*.dll
net use \\10.1.1.1\c$ /delete
您是否测试过**目标**文件(位于'z:\ ....'的文件)是否正在使用中? –
试试这个'tasklist/m thelocked.dll'并告诉我们状态。你也可以使用systernal的'psexplorer' – Paul
有一个完整的线程,告诉你如何摆脱它。 http://superuser.com/questions/117902/find-out-which-process-is-locking-a-file-or-folder-in-windows – Paul