blog community
Download all documents from a document library feature

 

Last month, I had to download course material from Microsoft. They specially opened up a WSS site, and provided all the downloads through document libraries. Very nice, however...this meant I had to 'click-download-click-download-click-download' all the documents in the gallery since there isn't a 'download all documents' option available.

 

I was a bit annoyed by the absence of such a feature, so I decided to create one myself. Thanks to the great extensibility capabilities of WSS v3, I was able to create a new add-in to document libraries which gives you a 'Download all documents' option in the action menu of the document library.

 

 

Clicking this option will generate a zipfile containing all the documents in the list and provides it as a download to you. I used the SharpZipLib to create the actual zipfile. I didn't want to 'eat' lots of server resources while creating the zipfile, so after you click it it immediatly starts writing to the reponse outputstream. This has one limitation though, if you get the 'save, open, run' dialog from your browser...you already have downloaded the entire zipfile to your machine.

 

I have provided two downloads for you:

  • The pre-compiled solution package: click
  • The sources for this feature: click

 


Posted 12-05-2007 13:08 by Bart Gunneman

Comments

junaid raza wrote re: Download all documents from a document library feature
on 22-05-2007 14:30

Hi, i got following error after i deployed the solution and clicked on 'download all documents'

Request for the permission of type 'Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' failed.

any idea?

Bart Gunneman wrote re: Download all documents from a document library feature
on 22-05-2007 14:45

Yes, Raise the trust level to "Full" :-)

Miguel Isidoro wrote SharePoint 2007: Tools Collection
on 26-05-2007 15:44
Miguel Isidoro wrote SharePoint 2007: Tools Collection
on 26-05-2007 15:45

Encontrei num post do blog do JOPX , este conjunto de tools para SharePoint 2007. SharePoint Tips Utility

Blog de Jorge Dieguez wrote Varias herramientas/utilidades para SharePoint
on 16-06-2007 12:41

Panel de Herramientas SharePoint flotante Este útil invento permite visualizar el Panel de Herramientas

Jorge Dieguez Blog wrote Varias herramientas/utilidades para SharePoint
on 16-06-2007 12:42

Panel de Herramientas SharePoint flotante Este útil invento permite visualizar el Panel de Herramientas

Walter Stiers - Academic Relations Team (BeLux) wrote SharePoint 2007 Tools Collection v2
on 20-06-2007 14:44

Another update: SharePoint Tips Utility Pack - package of SharePoint 2007 utilities for administrators

Nimrod Rozenfeld wrote re: Download all documents from a document library feature
on 10-08-2007 8:58

Hi Guys,

This feature is pure gold.

What did you have to do to get the DownloadDocs.aspx page to have a code behind page?

Bart Gunneman wrote re: Download all documents from a document library feature
on 10-08-2007 9:25

Hi Nimrod,

Glad you like it!

To answer your question, edit the Assembly attribute in the <% Page %> tag inside the aspx file and refer to the signed assembly. Deploy the assembly in the GAC and presto! :)

(Check out the sources if you like)

Hope this helps.

Bart

Nimrod Rozenfeld wrote re: Download all documents from a document library feature
on 10-08-2007 15:21

Hi Bart,

Thanks for the prompt reply, I noticed the DownloadAllDocumentsWeb.dll is not the GAC. am I wrong?

Bart Gunneman wrote re: Download all documents from a document library feature
on 10-08-2007 15:28

Nope, you are right sorry :)

So the proper answer to your previous question was:

You need to edit the Assembly attribute in the <% Page %> tag inside the aspx file and refer to the assembly. Deploy the assembly in the bin directory of the webapplication and you are ready to go.

However, you could also put the assembly in the GAC and refer to it throught the Page tags.

Greg Palmes wrote re: Download all documents from a document library feature
on 18-09-2007 19:07

Not sure how to set the trust level to full. Could you clarify?

Thanks!

Bart Gunneman wrote re: Download all documents from a document library feature
on 19-09-2007 8:31

Edit the web.config, search for the <trust> tag and change the level to 'Full' (case sensitive!)

Michael wrote re: Download all documents from a document library feature
on 20-01-2010 3:13

Hi

I don't know in which way I need to install it?

Please email to: michael@way2you.net

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
Enter code (required)
Powered by Community Server (Commercial Edition), by Telligent Systems