Posted in bollywood, productivity, Search, tricks

How to use cURL to download multiple MP3s/Photos/Videos at once

In response to my previous post about cURL as a swiss army knife for web pages, a number of people have asked my about real example to use pattern based downloading of cURL, so here is a small post about that.

Disclaimer: Please note that this is for educational purpose only and illegal use is not recommended or endorsed by me.

Now, the real part:

Let’s say you wanted to download multiple files, text, data, mp3 or videos etc. Take an example of MP3 sngs for new hindi movie Delhi Belly. These songs are available on multiple sites including one URL here.

Again note, that downloading songs from this or any other site may be against local & any other applicable laws based upon where you reside.

Here are the steps

1) Open the URL.

2) You would find that the download URL is something like  for the first song. and the download URL for the last song is something like

3) Now, if you wanted to use cURL pattern base download use, you can do something like:

curl -L{20,21,22,23,24,25,26,27,28,29} -O

-L option is to follow redirect, in case, the server is throwing some intermediate redirect.

-O option is to save them as local files rather than sending it to STDOUT.

4) This would download all files one by one and it would have having typing each file individually, handling redirects, and then saving them to local files.

5) After that you may need to rename all of them as MP3s, s you can run ren * *.mp3 (on windows) or mv * *.mp3 (on UNIX).

Happy cURL ing …

for any questions or doubts, please post in comments.

EDIT: has moved to after the old domain was banned.

5 thoughts on “How to use cURL to download multiple MP3s/Photos/Videos at once

  1. Hi Syed

    There is no generic script. Based upon what all files you want to download, you would issue a command similar to mentioned in step #3.

    Please go through the post & let me know, if you have any specific questions.


    1. So is it correctly understand that if I wanted to download ALL songs (generic) in a specific library that would not be possible? If it was, how would the curl look please?
      Thx for the blog btw 😉

  2. Hi there! I know this is kind of off topic

    I’m using the same

    blog platform as yours and I’m having difficulty finding one?
    Thanks a lot!

Leave a Reply


You are commenting using your account. Log Out /  Change )

Google photo


Twitter picture


Facebook photo


Connecting to %s