apache directory listing, download all

Marek Javůrek picture Marek Javůrek · Mar 15, 2011 · Viewed 35.7k times · Source

Is there any Windows tool or some way to download all the folders and files recursively from apache directory listing?

sample folder

Thanks

Answer

martin blank picture martin blank · Mar 15, 2011

wget for windows (or http://gnuwin32.sourceforge.net/packages/wget.htm)

Once installed it's as simple as: -

wget -m -np http://eamos.pf.jcu.cz/amos/kat_inf/externi/

The -m is an alias for --mirror. As a commenter noted, you probably want -np or --no-parent so that you don't go up in the directory structure. You might also want to add --wait=5 so you don't thrash the web server, --convert-links if you want local links in the html file when it's done, and --execute="robots = off" if you're not getting all of the files (ignores robots.txt file). Altogether now:

wget --execute="robots = off" --mirror --convert-links --no-parent --wait=5 http://eamos.pf.jcu.cz/amos/kat_inf/externi/