Download full directory while excluding index files?

I’m attempting to use wget to download a full directory hosted with Caddy’s browse directive.

The options -r -nd -c --no-parent work, but leave behind index.html* files.

When trying with the options -r -nd -c --no-parent --reject "index.html*", only 1 file actually gets downloaded.

Any way to not have the index files downloaded and the full directory still be downloaded?

Howdy @pika, welcome to the Caddy community.

Dunno about that for wget, as far as I knew --reject is correct here.

Anyway, on the Caddy side of things, you could probably try using the index directive to tell Caddy to use some long and nonsensical index filename so that it doesn’t think there’s an index, serving the browse page regardless of the index.html file: