M BUZZ CRAZE NEWS
// general

Wget: Download all files starting with a specified name?

By Emma Martinez

How do I download all files starting with a specified name with wget?

For example, I have the link .

There are the following files:

myFile_01_02.txt
myFile_01_03.txt
myFile3
yourFile
File1
secondFile

So, for example, I want to download all the files that starts with myFile. I read the help for the wget command but I didnt find anything useful. How can I do this?

3

1 Answer

As pointed out in the comments by @ivanivan, the -A (--accept) series of options must be used in conjunction with the -m (mirror) or -r (recursive) options. Therefore, interpreting your example command, the command you would likely want would be e.g. wget -m -nd -A "myFile_*_*.txt" (where -nd places all the matching files in a single directory rather than e.g. /).

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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