How To Download Multiple Files From A Website

Posted on by admin

May 02, 2019 Python provides different modules like urllib, requests etc to download files from the web. I am going to use the request library of python to efficiently download files from the URLs. Let’s start a look at step by step procedure to download files using URLs using request library−. Import requests. Enter the download link in the input box provided. Click on “Google drive” to start downloading the file to your Google drive storage. Alternatively you can even select from any of the other service such a Skydrive, Dropbox or Box and download the files to these services directly.

I am not sure if this is possible using standard web technologies.

How to upload and download files using cPanel's File Manager. Press SHIFT and the UP or DOWN arrow key to highlight multiple files. Click the Download icon. Navigate to the directory on your local computer where you want to save the file, and then save the file. Related Articles. How to Download Many Files From a Web Page at Once. Instead see a list of all images, videos, or other files that are embedded in the current page. Once you've chosen the files you want to download, you can click on 'Start!' To begin downloading them all or 'Queue!' PimpFish doesn't show progress bars or download multiple files.

I want the user to be able to download multiple files in a single action. That is click check boxes next to the files, and then get all the files that were checked.

Is it possible - if so what basic strategy do you recommend. I know I can use comets technology to create server side events that trigger an HttpResponse but I am hoping there is a simpler way.


17 Answers

HTTP does not support more than one file download at once.

There are two solutions:

  • Open x amount of windows to initiate the file downloads (this would be done with JavaScript)
  • preferred solution create a script to zip the files
Matěj PokornýMatěj Pokorný

You can create a temporary set of hidden iframes, initiate download by GET or POST inside of them, wait for downloads to start and remove iframes:

Or, without jQuery:

How To Download Anything

This solution works across browsers, and does not trigger warnings. Rather than creating an iframe, here we creates a link for each file. This prevents warning messages from popping up.

To handle the looping part, we use setTimeout, which is necessary for it to work in IE.


Easiest way would be to serve the multiple files bundled up into a ZIP file.

I suppose you could initiate multiple file downloads using a bunch of iframes or popups, but from a usability standpoint, a ZIP file is still better. Who wants to click through ten 'Save As' dialogs that the browser will bring up?

Yirmiyahu FischerYirmiyahu Fischer

working example:

I agree that a zip file is a neater solution... But if you have to push multiple file, here's the solution I came up with. It works in IE 9 and up (possibly lower version too - I haven't tested it), Firefox, Safari and Chrome. Chrome will display a message to user to obtain his agreement to download multiple files the first time your site use it.

The only side effect of this technique, is that user will see a delay between submit and the download dialog showing. To minimize this effect, I suggest you use the technique describe here and on this question Detect when browser receives file download that consist of setting a cookie with your file to know it has started download. You will have to check for this cookie on client side and to send it on server side. Don't forget to set the proper path for your cookie or you might not see it. You will also have to adapt the solution for multiple file download.


To improve on @Dmitry Nogin's answer: this worked in my case.

However, it's not tested, since I am not sure how the file dialogue works on various OS/browser combinations. (Thus community wiki.)

I am looking for a solution to do this, but unzipping the files in javascript was not as clean as I liked. I decided to encapsulate the files into a single SVG file.

If you have the files stored on the server (I don't), you can simply set the href in the SVG.

In my case, I'll convert the files to base64 and embed them in the SVG.

Edit: The SVG worked very well. If you are only going to download the files, ZIP might be better. If you are going to display the files, then SVG seems superior.


When using Ajax components it is possible to start multiple downloads. Therefore you have to use

Add an instance of AJAXDownload to your Page or whatever. Create an AjaxButton and override onSubmit. Create an AbstractAjaxTimerBehavior and start downloading.

Happy downloading!

Below code 100% working.

How To Download Multiple Files From A Webpage

Step 1: Paste below code in index.html file

Step 2: Paste below code in index.js file

NOTE : Make sure that all three files which are going to download will be placed in same folder along with angularProject/index.html or angularProject/index.js files.


This works in all browsers (IE11, firefox, Edge, Chrome and Chrome Mobile) My documents are in multiple select elements. The browsers seem to have issues when you try to do it too fast... So I used a timeout.

This is a solution that uses promises:

Getting list of url with ajax call and then use jquery plugin to download multiple files parallel.


How To Download Multiple Files From A Website To Another

Here is the way I do that. I open multiple ZIP but also other kind of data (I export projet in PDF and at same time many ZIPs with document).

Download Multiple Files From Website At Once

I just copy past part of my code.The call from a button in a list:

So a basic call to a JS routine (Vanilla rules!). here is the JS routine:

The trick is to NOT give the direct link of the ZIP file but to send it to the browser. Like this:

By far the easiest solution (at least in ubuntu/linux):

  • make a text file with the urls of the files to download (i.e. file.txt)
  • put the 'file.txt' in the directory where you want to download the files
  • open the terminal in the download directory from the previous lin
  • download the files with the command 'wget -i file.txt'

Works like a charm.

How To Download Multiple Files From A Website


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