Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

5 Answers 5

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

http://sharepoint.microsoft.com/blogs/zach/Lists/Posts/Post.aspx?ID=7 http://wiki.threewill.com/display/enterprise/Add+Files+to+a+SharePoint+Document+Library+using+PowerShell http://pshell.info/sharepoint/166/uploading-documents-to-sharepoint/

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 at 22:03

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

http://msdn.microsoft.com/en-us/library/dd902097.aspx

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: http://www.codeproject.com/KB/sharepoint/Removing_Title_column.aspx 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 * http://www.myserver.com/myFolder

share|improve this answer

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.