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.
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/
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
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.
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
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