Robocopy Error 32 File I'm trying to update/replace is being used by another process

大城市里の小女人 提交于 2019-12-23 04:22:59

问题


I'm trying to copy a local file onto a server using robocopy. This is my script:

if exist \\10.1.1.1\c$ net use \\10.1.1.1\c$ /delete
net use Z: \\10.1.1.1\c$ p@ssword /user:domain\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

I realized that it's not working because the file I'm trying to replace on the server is currently in use on the server. How do I replace a file that's currently in use?

来源:https://stackoverflow.com/questions/33112307/robocopy-error-32-file-im-trying-to-update-replace-is-being-used-by-another-pro

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!