Tell me more ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Salvete! How can I, from the commandline, upload a file to a document library? Now, I found davcopy, which works, sort of. I can only upload the file using my domain account that I am already logged in with. If I give credentials (even my own!) the fail.

But I am not attached to davcopy. Maybe there is another way to do this from the commandline? I do want to avoid powershell, because I need to provide a way for this to be done to certain users who don't have powershell.

I am thinking it could be done using some sort of dav service.

share|improve this question

2 Answers

up vote 1 down vote accepted

Believe it or not, you can use Windows net use to map a sharepoint library to a drive letter! Then you can use plain old copy or xcopy or whatever.

net use r: https://some.portal.org/documents [password] user:domainName\[username]
copy c:\somefile.txt r:\somefile.txt

Here is where I found that answer. I've done this, and it works like a charm. You can even specify whatever credentials you like, too.

share|improve this answer
This is also the equivalent of using Windows Explorer and Map Network Drive R:\. – Russell Aug 10 '12 at 4:33
Yes, that's true, but the ideas was to do this from the commandline. – BGM Aug 10 '12 at 13:37
Yep just in case :) – Russell Aug 11 '12 at 11:37

You may want to check out Sync FileSystem and SharePoint List on codeplex

share|improve this answer
Thanks, but that's not quite what I had in mind. – BGM Aug 10 '12 at 3:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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