Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to download a directory from webpage. i am trying to do using wget and crawl but i am not able to download the whole directory as it was there in web-page or in any-other way. suppose the web-page is abcd.com/ddd/bbb/A. inside A there is information relevant that start with A. my target is to download what ever the file is there in A i.e recursively downloading all the subfolder in A if available.

share|improve this question

1 Answer 1

If all the documents are accessible via plain HTML links, then the following should work:

wget -np -r -l0 http://abcd.com/ddd/bbb/A/

This is assuming that A is a directory; if it is not, then you should omit the trailing slash and accept downloading everything in bbb instead.

-np omits parent directories. -r toggles recursive downloads, and -l0 selects infinite download depth. The latter is of course risky in case there are infinite symlink loops or similar constructs. So it might be safer to plug in a reasonable estimate of the maximal link chain needed to reach all desired documents. I often use -l5 myself.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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