Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using wget for Windows. I got the binaries from here. When I use wget, by default, it retrieves the contents of the url specified recursively. I need to get only the files present in the immediate directory. How to do that? Thanks.

share|improve this question
up vote 2 down vote accepted

Specify the -l flag to limit the depth of recursion (set it to 0: -l 0 to only retrieve files in the top level directory.

share|improve this answer

Based on wget -? you need to add -r to get enable recursive get. Do you have an option set in a .wgetrc or wgetrc configuration file? (wget here reports which configuration files it reads when run.)

Look for a settings reclevel and recursive (that are not commented out) in the configuration file.

share|improve this answer

Your Answer


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.