1

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.

3

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.

1

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.

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.