Share via


Using WebDav & RoboCopy to copy docs between Document Libraries

Question

Tuesday, October 26, 2010 10:21 AM

I am trying to automate the process of copying documents between SharePoint 2010 document libraries using a RoboCopy job which calls WebDav. My Farm is running on Server 2008 R2 Hyper-V.

What is most puzzling (and annoying) is that I have a development environment where the job works perfectly - it is in staging and production where I am having problems. Throughout all of the environments I can successfully browse to the document libraries in question using Explorer View.

This is the command I am running:

ROBOCOPY \%*serveralias%\*DavWWWroot\sites\library1% "\"serveralias%\DavWWWroot\sites\library%

And these are the error messages I'm receiving:

Error 1 - The specified network name is no longer available

Error 2 - A device attached to the system is not functioning

I can confirm that the following are running:

Desktop Experience (via Server Manager), WebClient (Via Windows Services)

Does anyone have any suggestions?

 

 

 

 

 

 

 

All replies (9)

Tuesday, October 26, 2010 10:36 AM

Hi adam5132.

Have you tried to map those folders to a drive letter and tried to copy?

Regards Stefan.

http://www.n8d.at/blog
MCTS - SharePoint / WSS Configuration and Development


Tuesday, October 26, 2010 10:54 AM

Hello Stefan, thank-you for your response.

Yes, if I map network drives to the two different document library locations, I can successfully copy between them.

However, I have not been forced to do this on my development environment and the copying process is still successful without the need for mapped drivers.

There is a setting (Server 2008 R2 related I believe) which is different between my environments....what this is I do not know, depsite spending an enternity cross-referencing the servers!


Wednesday, February 23, 2011 3:49 PM

Can you tell my how you map a network drive to SP2010?

 

Can't seem to find it anyway, but folks say they can do it....it definitely is not working for me, as it it did with Sharepoint 2007

 

thx for any help!

 

pat


Wednesday, February 23, 2011 7:46 PM | 1 vote

Hi,

the easiest way to do this is to use the following command:
net use * http://yourserver/yourlibrary

but you can also open the press the alt-key in explorer which will show you the menu bar and than the use:
Tool
-> Map Network Drive

Hope this helps it worked for me.
Kind regards Stefan

http://www.n8d.at/blog
twitter: n8design

Microsoft Community Contributor 2011
MCTS - SharePoint / WSS Configuration and Development


Wednesday, February 23, 2011 7:51 PM

Out of curiousity, is the production environment HTTPS and the dev environment just HTTP? :) WebDAV behavior under HTTPS is a bit different than it is in HTTP.SharePoint 2010 Extensions - http://sp2010ext.codeplex.com/ My Blog - http://www.withinsharepoint.com Twitter - http://twitter.com/#!/withnsharepoint


Thursday, February 24, 2011 8:06 PM

Hi,

no should be https. What you could also do is to try to open in explorer view and than map as a network drive this should normally work.

kind regrards
Stefan

http://www.n8d.at/blog
twitter: n8design

Microsoft Community Contributor 2011
MCTS - SharePoint / WSS Configuration and Development


Saturday, February 26, 2011 6:29 PM

Thanks Stefan....

 

What I was actually trying to accomplish was to link an Excel file to an MS access database, where the excel file resides on the sharepoint.  The net use command works fine, as does other map network drive approach I have tried.  It works slick (THANKS!).

Problem becomes that when you try to link to the excel file, that resides on the sharepoint (as an excel file itself...seems straight forward), you get the error:

"Only XML files can be imported from an internet address (http://, ftp://). Enter a path that points to a location on your computer or on the network."

Of course, I consider this mapped sharepoint drive "on the network" so I really don't understand why access is having this issue.  This was no problem at all on Sharepoint 2007.  So sad Microsoft had to make something that worked so well, suddenly much more complicated. (or possibly, impossible)

Anyway, your tip worked well, but I am still stuck!  Thanks for helping me!

 

Pklocke


Saturday, February 26, 2011 6:31 PM

Ok, I figured it out...!

what was happening was access kept converting the mapped drive (in this case, I mapped it to T:), to the full URL (http://mysharepoint/yada/yada) and I would get that error.  However, I tried, instead of browsing for the drive to link, I tried hard-coding (Typing) the file name  as

T:\dir1\yada\myfile.xls

and it worked.  So appreciate you helping.  Get the drive mapped was key.  I was never able to get it using the "Map network drive" dialogs native to windows, but the "net use *" got it done.

Woohoo!

 

Pklocke


Sunday, February 27, 2011 7:36 AM

Ok, I figured it out...!

what was happening was access kept converting the mapped drive (in this case, I mapped it to T:), to the full URL (http://mysharepoint/yada/yada) and I would get that error.  However, I tried, instead of browsing for the drive to link, I tried hard-coding (Typing) the file name  as

T:\dir1\yada\myfile.xls

and it worked.  So appreciate you helping.  Get the drive mapped was key.  I was never able to get it using the "Map network drive" dialogs native to windows, but the "net use *" got it done.

Woohoo!

 

Pklocke

Yeah, thats exactly the weird behavior your get with WebDAV and https vs http. Glad it's working now.SharePoint 2010 Extensions - http://sp2010ext.codeplex.com/ My Blog - http://www.withinsharepoint.com Twitter - http://twitter.com/#!/withnsharepoint