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 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
add comment

2 Answers 2

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
add comment

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
add comment

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.