Automatically download sequentially designated files - gHacks Tech News

Automatically download sequentially designated files

Ever wanted to download multiple podcasts/vidcasts or similar files that are for example attached to RSS feeds without having to download each of them manually from the website?

Having bought a new mp3 player, I needed to download multiple episodes of my favorite podcast (English as a Second Language) links to which I have been collecting for some time but didn't have much free time to listen to them.

It would be insane to have to follow each link to the website and then manually download the podcast one after the other, repeating this procedure several hundred times...

Actually, two situations can turn up at that moment:

1) Listing the contents of a particular website is permitted and you can simply paste the path to a download manager which should be able to manage downloading the files. Though, it's not very common.

2) Listing the contents is prohibited and your download manager probably won't be able to manage downloading the files.

Listing means that the web server displays the files in a directory format or on a page where all direct download links are provided.

You're not gonna download the files one at a time, are you?

Since in my case a "Access denied" message appeared, my download manager was unable to download contents of the website and I had to find another way. I couldn't remember any Windows' built-in utility that could do that job for me so that I checked the net and found a nice tool that can download files from the command-line. File Downloader is a useful tool working in command-line mode, able to download files with several parameters. Now, this tool wouldn't be of much use if we didn't combine it with the power of command-line itself, right?

That's when creating loops with the "for" statement comes in handy again. Meeting the two requirements:

  • base path of desired files remains the same for each file
  • each file is (sequentially) designated with a number

we continue our effort-saving journey. To download those multiple files from a single source, fire up your Command Line Interface and set the working directory to File Dowloader's home folder. Here we can start the loop with proper parameters:

for /L %i in (#,1,#) do download http://web.site.net/Podcast%i.mp3
the first # represents the number included in first filename
the second # represents the number included in last filename
replace this example URL with the real one, %i substitutes number in filename

Here we go. Hit Enter, sit back and watch File Downloader do that time-consuming process for you. I've just finished downloading 329 podcasts for my mp3 player w/o a single mouse click which saved me more than enough time to write this article ;)

Update: The program is not free anymore it appears. If you want to download podcats, try Robert's Podcatcher instead. You can check out our download manager overview as well for tools that can cope with any type of file.

Summary
Article Name
Automatically download sequentially designated files
Description
How to download a large number of files that are sequentially named.
Author




  • We need your help

    Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

    We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats (video ads) or subscription fees.

    If you like our content, and would like to help, please consider making a contribution:

    Comments

    1. Roman ShaRP said on December 25, 2007 at 10:21 am
      Reply

      I had 2 such tools – 1st is mass download function in “Download Master” downloader, and there where simple “Robotget” utility with graphical interface.

    2. Tobey said on December 25, 2007 at 10:34 am
      Reply

      Oh just a note that the files do not neccessarily be destignated with numbers in a sequence because File Downloader automaticly skips non-existing files. Therefore you can get for example only files #47 & #13 with a range set to 13,1,47.

      @Roman ShaRP: Yea, I guess some download managers are able to handle such situations but none of those I use was able to do it :)
      Robotget seems to be a very useful GUI for this command-line script, thanks for sharing.

    3. Cael said on December 25, 2007 at 11:26 am
      Reply

      Downthemall extension for Firefox works on that website.

    4. Kris said on December 25, 2007 at 1:53 pm
      Reply

      The Firefox DownThemAll extension can do this. It will use FF’s cookies (and session cookies!) and existing logins.

      Tools->DownThemAll->dTa! Manager->Add URL(s) button.

      Examples it gives:
      http://blah/mygallery%5BA-C%5D/photo%5B001-100 step:2].jpg

      However, dTa can suffer from very long delays (taking Firefox with it) when you tell it to get thousands of files – I think it rewrites its XML config file a lot.

    Leave a Reply