Live Chat!

Performs a batch download using wget

* * * * * 1 votos

July 31st, 2006 mysurface Posted in Network, wget | Hits: 18427 |

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

[中文翻译]

6 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 !

Leave a Reply

Security Code: