blog community

Welcome to blog community Sign in | Join | Help
in Search

Portals & Integration blog

Robert te Kaat and Bart Gunneman on Office, SharePoint, Team System and other random .NET related stuff :)

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

 

Published Saturday, May 12, 2007 1:08 PM by Bart Gunneman

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

 

junaid raza said:

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?

May 22, 2007 2:30 PM
 

Bart Gunneman said:

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

May 22, 2007 2:45 PM
 

Miguel Isidoro said:

May 26, 2007 3:44 PM
 

Miguel Isidoro said:

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

May 26, 2007 3:45 PM
 

Blog de Jorge Dieguez said:

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

June 16, 2007 12:41 PM
 

Jorge Dieguez Blog said:

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

June 16, 2007 12:42 PM
 

Walter Stiers - Academic Relations Team (BeLux) said:

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

June 20, 2007 2:44 PM
 

Nimrod Rozenfeld said:

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?

August 10, 2007 8:58 AM
 

Bart Gunneman said:

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

August 10, 2007 9:25 AM
 

Nimrod Rozenfeld said:

Hi Bart,

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

August 10, 2007 3:21 PM
 

Bart Gunneman said:

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.

August 10, 2007 3:28 PM
 

Greg Palmes said:

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

Thanks!

September 18, 2007 7:07 PM
 

Bart Gunneman said:

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

September 19, 2007 8:31 AM

Leave a Comment

(required) 
(optional)
(required) 
Submit

This Blog

Syndication

News

Contact

Bart's online status:
If I am online, click to send me a message!

(No messenger needed)


Quick links

Creating a MOSS / Office Demo setup
Using a AD provider on WSS v3

Stats



Statcounter:
Powered by Community Server, by Telligent Systems