WGET non-recursive mode

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.

bdhar

Posted 2010-07-01T06:44:31.193

Reputation: 421

Answers

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.

John Weldon

Posted 2010-07-01T06:44:31.193

Reputation: 1 411

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.

Richard

Posted 2010-07-01T06:44:31.193

Reputation: 8 152