0

I'm trying to use robocopy in a .bat script to copy files from an existing SP (2007 & 2010) to a new one (2013). (I'm generating this .bat with a powershell script, but that's not the point)

So i got something like that

start robocopy "source" "destination" options
start robocopy "\\url.oldSP@port\DavWWWRoot\old\path\Library1" "\\url.newSP@port\DavWWWRoot\sites\path\Library1" options

But my .bat script don't want to copy files ... saying that the path is not good =/ All I want to do is the same as when you open a library with an explorer and right-click -> copy, then open the new library (on another SP) and right-click -> paste.

  • The only thing i've just find is : when i open the library in the explorer (doesnt matter which) robocopy is working, for a few files. And after : can't find the path ... It seems like i open the connection with the explorer, then i loose it =/ – Nico Jul 8 '13 at 11:58
2

What I would recommend doing in the BAT file is to first have some commands which map the SP locations. For example:

net use x: "\\url.oldSP@port\DavWWWRoot\old\path\Library1"
net use y: "\\url.newSP@port\DavWWWRoot\sites\path\Library1"

Then finally

robocopy x: y: /mir

Also if those paths that you attempt to map to give you a head ache then use the "Open in Windows Explorer" command in each of the Libraries that you are trying to use and copy and past the resulting address bars from the Windows Explorer in to the Notepad that you are using to make the batch file

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.