Performs a batch download using wget

July 31st, 2006 mysurface Posted in Network, wget | Hits: 116312 | 11 Comments »

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

[中文翻译]

11 Responses to “Performs a batch download using wget”

  1. Found this article pretty useful. 5/5.

  2. Thanks 5/5

  3. Very helpfully.
    But i didn’t understand the following part -A.mp3 -A.wma.
    What is meant with the Letter “A”?
    Thanks in advance.

  4. A statistic: only 1 out of 10 dumb americans can spell “definitely” correctly.

  5. The -A option allows you to specify which types of accepted files should be downloaded. In this case, all files with the .wma and .mp3 file extension will be downloaded.

  6. Perfect, thanks !

  7. Recommendation for’ Dear news this chapter. I think if everyone acted well. There would be no problem motleyed Which is able to not be edited offline. Every network station to figure a way

  8. Very good blog. I reali like it! Good 4 you;)

  9. Believe me when I shout it from the roof tops how original your site is. Quite frankly I have not unearthed stories of this nature keep up the excellent work.

  10. I am regular reader, how are you everybody?
    This article posted at this web site is in fact nice.

  11. Wow, this post ?s nice, my younger siste? is analyzing such things, thus I am going to ?nform her.

Leave a Reply