
If you want to download multiple files recursively from a website wget
is the way to go. The popular alternative tool curl
does not support recursive download.
# Download all files having extension jar, xml but not exe from the given path looking at one level (immediate children only) wget -r -np -l 1 -A jar,xml -R exe http://target-website.com/path/ # Interpretation of the options -r Recursive downaload -np Do not ascend to the parent directory -l Recursion depth (0 for infinite) -A Accepted file extensions
Note that, links constructed dynamically using Javascript or any other way, won’t be visible to wget.
If wget
is not installed already, use the below commands:
# Windows choco install wget # Mac brew install wget
Recursively Download Files Using wget
Be The First
Join our list to get instant access to new articles and weekly newsletter.