I have read the manual page for wget and search Google for an answer, but haven't been able to get it.

How would I use wget to download only folders that contain a specific term in their names from an FTP site that also has multiple other directories without that term in their names?

wget -I /people,/cgi-bin http://host/people/bozo/

-I is followed by a comma separated list of the directories you want to include.

However, note that this will just include the full name listed in -I, I believe, not part of the name, it sounds like you may want to be including directories based on a partial pattern. If anyone knows how to do regex type excludes/includes with wget, I'd like to learn that, I've looked for that for years.


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.