Export Documents from Sharepoint

April 5th, 2006

Last night I created a simple utility to connect to a Sharepoint database to export all of the files held in the database. I call it the Sharepoint Documents Exporter. In that Zip archive is an executable and a configuration file. To use you it you must set the database connection string and possibly adjust the documents query. It is defaulted to only pull back the first 20 results. I suggest changing the 20 to 1000.

Once it starts, it will show you the number of files it finds in Sharepoint before starting the process of individually writing each file to the output directory set in the configuration file. Once it has completed it will have a tree of files below the output directory holding all of the exported files.

Then you can simply run it from a command console. I would like to create a WinForms version which allows you to dig into a database the way some of the .NET tools do. Once I have more time, I will do so.

4 Responses to “Export Documents from Sharepoint”

  1. Peter Smith Says:

    I tried to download the zip file but when unzipping I get an error saying the file is invalid or corrupt, can you help? thanks.

  2. brennan Says:

    What web browser are you using to download it? And how are you unzipping the file? I have downloaded it with Firefox and MSIE and both times I can unzip it with Windows Explorer. Are you using WinZip or another zip utility?

  3. Roger Horton Says:

    I also was unable to unzip the file either with WinZip 10.0 or with IE7.

  4. brennan Says:

    Try it with Firefox. I have seen many people have problem with IE. One way to fix IE is to clear the cache. There is nothing wrong with the file. I just downloaded it with IE6 on my work computer and opened it with Windows Explorer support for zip files. The file was also created with WinXP.