Automatically download sequentially designated files

Status
Not open for further replies.

Osiris

Golden Master
Messages
36,817
Location
Kentucky
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 podcasts one after one, 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. 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 [via Softpedia] 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.

Automatically download sequentially designated files - www.Tech-Dump.com
 
Status
Not open for further replies.
Back
Top Bottom