3

I want to use wget to DL some files. I want to DL only files whose name that fit a certain pattern, e.g. ???.txt and not any other *.txt files. Can this be done with wget? I could only find a way to --accept/--reject files based on the extension. Thanks!

4

You can use -A option with --accept Example : to download all the gif images from the website,

wget -r -A gif www.foobar.com

or

wget -r --accept=gif www.foobar.com
|improve this answer|||||
0

If you are downloading from an website, you don't -- HTTP doesn't support wildcards. But you can use the --mirror option which will try to mirror the entire site. Try mixing the --mirror and the --accept and see what happens.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy