dgmoore1
asked on
SharePoint/VBA - copy folder contents to folders on a non-Sharepoint server
I need to write a procedure in Access to copy the contents of two folders on a SharePoint server to folders on a non-Sharepoint network server. Can anybody point me in the right direction?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I am not sure about the specific MS Access "FileCopy" command, but lets assume you are writing a simple command line (batch file).
It would be like this:
copy \\servername\sites\sitenam e\doclibna me\foldern ame\*.* \\destinationserver\folder
The Web Client service needs to be running from the workstation (default on workstation OS) where the code is executing.
I hope that clears things up.
It would be like this:
copy \\servername\sites\sitenam
The Web Client service needs to be running from the workstation (default on workstation OS) where the code is executing.
I hope that clears things up.
ASKER
OK - I have never had much luck interacting programmatically with Sharepoint folders without using XMLHTTP. I'll give this a try tomorrow @ work and see if I can get it to work.
Thanks
Thanks
ASKER
How would I pass my credentials to Sharepoint for authentication?
By default it will use whatever account is currently logged on as.
ASKER
The servers in question are in different domains; each requires authentication before access is granted for any transaction. Each file action (read/write) request must be accompanied by valid credentials. I don't see how credentials can be passed programmatically in the scenario you suggest.
ASKER
Nobody will be logged on to either server when a transaction is initiated by the proposed process.
Whatever is executing your process/transaction needs to authenticate to the SP doclib and network share. The process has to run under a credential even if its local machine, in which case you might need to add a runas command.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Great, however did I not provide guidance that pointed you in the right direction? Btw, you don't need to use webdrive to map a folder to sharepoint. It could have been done with a net use command.
ASKER
Your suggestions were helpful, and I did award you the points. WebDrive is a lot easier, however. Thanks
No points awarded
ASKER
This is odd. I awarded the points earlier this morning and the page reloaded showing my answer as accepted, with 500 points awarded to you and 0 points to me. I'll try it again and see if it sticks this time.
ASKER
Take a look at the Close Request Pending box at the top. Hopefully it is now correct - it's exactly what I got when I submitted earlier today
ASKER
FileCopy "\\Servername\sites\sitena
?
Does the Web Client service need to be running on the workstation where the code is executing, or on the server where the files reside?
Unless I'm missing something I don't see how this could work - could you provide a little more detail?
Thanks