I want to write a batch file to move all the content from mapped location to the server
ODM folder is already there on the server. I tried both the code:
robocopy "\\eng1\d$\ODM" "\\200.200.200.9\c$\ODM" /s /z /move /mt:96 /log:C:\Temp\log.txt
and
xcopy /-y \\eng1\d$\ODM\*.* \\200.200.200.9\C$\ODM\ /d /c /y
pause
I am getting errors as
Invalid username or password for first code and Invalid Drive specification for second
What is wrong with the code?
You can just run net use
as also mentioned by Stephan in the comments above, to ensure it has a connection to both UNC paths, each time using username and password. (Remove domain\\
if you do not use domain.
net use \\eng1\IPC$ /user:domain\user password
net use \\200.200.200.9\IPC$ /user:domain\user password
robocopy "\\eng1\d$\ODM" "\\200.200.200.9\c$\ODM" /s /z /move /mt:96 /log:C:\Temp\log.txt
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.