Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Looking for a way to automagically add files to a sharepoint document library. We have a process that runs and produces a file (Java process). We would like to either add the file directly to Sharepoint or schedule a task that picks up files and puts them in Sharepoint. So a Java or vb/batch/powershell solution would be the best fit.

share|improve this question

You can directly call the SharePoint APIs through Powershell. Here are some links to help out:

share|improve this answer
Great links - I stumbled upon a simple, free utility that takes care of this for us. – Jibba Aug 20 '09 at 22:45
The 3 links are not working anymore. – RealHowTo Feb 19 '14 at 22:03

Here's an MSDN article describing an ASP.NET approach to this, which you could possibly modify for your situation:

share|improve this answer

Not a scripting solution but we have a Delphi Application that needed to do this. Since Document Libraries can be accessed via Explorer as UNC shares we simply just copy the files directly into the Document Library. You can also map a drive to the library if needed.

The Delphi application uses normal Windows File Copy commands to transfer the files.

share|improve this answer
I was hoping that it would be that simple, but couldn't get a drive mapped or file copy to UNC. Researched and it seems that it works for some and not for others. Probably something in the way the site is setup. – Jibba Aug 20 '09 at 22:22

davcopy works great.. but I had to first set the title column to be an optional field in the upload destination library for it to show up (otherwise it was checked out and folk could not see it) see: but set it to optional instead of hidden

share|improve this answer
up vote 0 down vote accepted

In the interest of keeping things dead simple, we are going with DavCopy. This lets us run our process, and then run a simple batch script to copy the files to SharePoint. It also produces a nice output report for the copy process.
Syntax: DavCopy.exe *

share|improve this answer

Your Answer


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.