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.

link|improve this question

40% accept rate
feedback

2 Answers

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.

link|improve this answer
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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