Welcome to EMC Consulting Blogs Sign in | Join | Help

Stuart Preston's Blog

Stuart was CTO for Application Consulting EMEA at EMC Consulting until October 2009, now blogging at http://stuartpreston.net

Sharepoint/WSS Bulk Upload Tool

[Updated: 7th August 2007 - So many of you left me comments asking for the source code in the last 2.5 years, I've attached it to this post.  Unfortunately I lost the original code, but have recreated it from the assembly.  It has a dependency on .NET Framework 2.0]

Some while ago now, I wrote a tool to automate the uploading of an entire folder and subfolders into a Sharepoint/Windows Sharepoint Services Document Library.  It uses some simple WebDAV calls to do all the uploading/folder creation.  I've tidyed it up a little, and put a link to the file below in case anyone else finds it useful.

Note: If run repeatedly, the documents are overwritten in the target document library, so be careful!  Of course, the tool runs in the context of the calling user, so you need to ensure you have the relevant rights in order to create the remote files/folders!

Bulk Import Tool

 

Published 07 August 2007 18:30 by Stuart.Preston
Filed under:

Attachment(s): Conchango.Sharepoint.Utilities.BulkUpload.zip

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Chris Crowe [ IIS MVP ] said:

August 16, 2005 20:27
 

Chris Crowe [ IIS MVP ] said:

August 16, 2005 20:49
 

Chris Crowe [ IIS MVP ] said:

August 16, 2005 21:33
 

Chris Crowe [ IIS MVP ] said:

August 16, 2005 21:36
 

John D. Porter said:

How about the source code?
February 1, 2006 21:18
 

Uma said:

This solutions works well with my problem. Now, I need to upload many documents into respective doc. libraries.  I wonder, whether I can set my own userid and modified date column values for each document?  I appreciate your help in advance.

Thanks,

Uma Somanchi

June 11, 2007 21:02
 

Stuart.Preston said:

Unfortunately, both fields are system generated.

June 11, 2007 21:08
 

Manju said:

Can you post the source code? Appreciate it.
August 7, 2007 18:19
 

Stuart.Preston said:

As so many asked, I have updated the post to include the source, attached.

August 7, 2007 18:41
 

thool said:

Thanks, your little tool is very helpful.
August 24, 2007 08:28
 

Ross said:

Thanks ....

it really worked like a charm... Thanks anywasy

September 24, 2008 18:13
 

M.Santos said:

Thanks! I really couldn't find a relevant solution anywhere else

November 18, 2008 15:34
 

zkc said:

Thank you very much indeed! I spent at least one day trying to make this working. I've found several examples but none of them worked. Except this one and only!

I can also confirm this works perfectly on SharePoint 2007 server using WSS 3.0, running it from ASP.NET 3.5.

January 22, 2009 15:33
 

Mateen said:

Hey Guys, this sounds like the answer to my prayers! I've downloaded the files but I can't seem to figure out how to run it. do I extract the files to a adirectory on my WSS server and then run a comandline?

January 27, 2009 16:00
 

Stuart.Preston said:

This is the source code to the tool.  There is a compiled copy in the bin/debug folder that you should be able to copy to your server and run from there (it doesn't need to be installed on the WSS server).

January 27, 2009 16:03
 

Martin said:

Hi, Just wondering if it is possible to tell the app to overwrite special characters?  I am attempting to load alot of documents, and it seems to FAIL on documents with special characters (eg - &).  I would just like to remove these characters from the filename before uploading it to sharepoint

February 19, 2009 06:10
 

Stuart.Preston said:

The source code is attached, there's a simple regex to do the replacement, perhaps you can try the one from here which seems more complete: http://geek.hubkey.com/2008/11/get-valid-sharepoint-file-or-folder.html

February 19, 2009 07:56
 

Kelly OConnor said:

When I run the tool from the same server as sharepoint is running on I get this error:

C:\Network\Oven Logs\logs>spsbulkupload "c:\network\oven logs\logs\oven1" "http:

//w2k3serv01:31459/Oven Logs/oven_1"

Bulk Sharepoint/WSS Document Upload Tool

v1.0 by Stuart Preston, Conchango plc 2004-2005

This tool is offered without warranty or support of any kind.

Using source folder: c:\network\oven logs\logs\oven1

Using destination folder: http://w2k3serv01:31459/Oven Logs/oven_1

-> http://w2k3serv01:31459/Oven Logs/oven_1/09022608.csv (FAIL)

The remote server returned an error: (409) Conflict.

DEBUG: file length (chars) = 53

-> http://w2k3serv01:31459/Oven Logs/oven_1/09030208.csv (FAIL)

The remote server returned an error: (409) Conflict.

DEBUG: file length (chars) = 53

-> http://w2k3serv01:31459/Oven Logs/oven_1/09030400.csv (FAIL)

The remote server returned an error: (409) Conflict.

DEBUG: file length (chars) = 53

Do you know what might be the problem? the folder contains 3 .csv files with numbers as the filename. I have tried many different command line variations with no results. This tool looks like exactly what I need, I would love to be able to use it.

Thanks, Kelly

March 8, 2009 21:25
 

Kelly OConnor said:

I don't know if my first post was posted but if it does I just would like to say I got it working and it works perfectly for what I need. I had renamed my sharepoint library after creating it and I guess the old name was lingering. I deleted the library, built a new one and after that the tool uploaded just fine. Thanks for a great tool!

Kelly

March 8, 2009 21:58

Leave a Comment

(required) 
(optional)
(required) 
Submit

This Blog

Syndication

News

I have now left EMC Consulting and can be found at http://stuartpreston.net
Powered by Community Server (Personal Edition), by Telligent Systems