SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to download multiple documents from document library. I select several documents and then click on 'download' icon present in ribbon. It should download all files and retain its metadata. 'Download' should be custom action in ribbon. Can anyone please provide me custom code for the same.

share|improve this question
up vote 1 down vote accepted

That's more a case of LMGTFY - Here's a complete tutorial plus a .wsp to add this function.

To get some basic understanding

Since you can't download multiple files in one response, you need to package them in a .zip for example. What you have to do is getting the byte[] foreach file and package them together. Then add created .zip to the response to invoke a download dialog.

share|improve this answer
Hi, Thanks a ton :) – Brishal Jul 2 '14 at 12:06
I also got another link while googling This blog is reference of same blog you provided, but in this blog he changed a code little bit. can you please help where exactly code need to be changed wrt your link – Brishal Jul 2 '14 at 12:07
There is a problem when you are not at root level. The comments in the blog I referred are giving a lot of extra information. Example -… – Mx. Jul 2 '14 at 12:12
yes, so where exactly we need to make code change if I have to do same in subsite? code is provided in link provided by me.. but i cannot judge where exactly change need to be made(in which file) – Brishal Jul 2 '14 at 12:50
as written in the comment I linked in my previous comment "I changed Ln36 in CustomAction.js to form.setAttribute("action", + "/_layouts/deviantpoint.downloadzip/downloadzip.aspx"); and Ln16 in DownloadZip.aspx.cs to string docLibUrl = fullDocLibSourceUrl;" -- See more at:… – Mx. Jul 2 '14 at 12:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.