If I want to download all files in a directory of a website, i have to perform a long wget command, they is what I do at first:
wget -nd -r -l1 --no-parent http://www.foo.com/mp3/
This works fine, but sometimes it gives some silly index.@xx files that wish I do not want. To make your directory clean, if you knows the file format you want, you can do this:
wget -nd -r -l1 --no-parent -A.mp3 -A.wma http://www.foo.com/mp3/
I am going to explain briefly what is the meaning of the options I speficied.
-nd no directory, by default wget creates a dir
-r recursively download
-l1 (L one) level 1, download only of that particular folder, don’t go depth on it.
–no-parent I definately don’t want the parent’s files