Friday, November 17, 2006

 

Downloading multiple files from a site.

There are multiple extensions which you can add to firefox to select and download multiple files from a site.I like to do this easier way on a command line.

In Windows:
$ dog --links http://blogs.parachute.com/jobtalk/archives/podcasts/index.html |grep mp3|sed -e "s/^/ wget -c /" >gett.bat
In Mac OS X:
$~>echo '#!/bin/sh'  >gett.sh
$~>dog --links http://blogs.parachute.com/jobtalk/archives/podcasts/index.html |grep mp3|sed -e "s/^/ wget -c /" >>gett.sh
$~>chmod +x gett.sh
Explanation:
dog gets the list of links in the URL. dog is better than cat(concantenation)!
grep selects the URL of only the mp3 file.
sed adds wget -c before each line.

For Windows:
wget, grep and sed are available through Cygwin. You can compile dog in Cygwin environment. Double clicking the batch file gett.bat will download all the files you selected.

For Mac OS X:
wget, grep and sed are available through terminal. You can compile dog and install. Issue $~>./gett.sh to download the files selected.

You can download the source for dog from here: http://ftp.kernel.pl/people/baseciq/rpm/src/dog-1.7-1.src.rpm. The source is in the rpm(Redhat package format). I used Total Commander to extract the files in Windows.

Labels:


Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?