How To Download All Files From A Website Directory Using Wget Windows
How To Download All Files From A Website Directory Using Wget Windows
If you want to download all les or only certain type of les (such as only images) from a website
directory or a web folder, you can use a tool called Wget in Windows to download the les
automatically. In this guide, you will learn how to use Wget (a command to be executed in command
prompt) to download les from a website directory in Windows 10.
https://eternallybored.org/misc/wget/
Once downloaded, unzip it onto any directory you like. To make things easier later, unzip it to C:\wget.
Next, open an elevated Command Prompt (run as administrator).
To be able to run the Wget command, you need to rst change the current working directory to the
Wget folder. If you unzip the Wget to C:\wget earlier, in command prompt, type the following to
change directory to C:\wget.
cd c:\wget
While you are in the directory, enter the following command to execute the automatic downloads of all
les from the entered website directory.
Note: Replace the example website address with the actual website directory where you want to
download the les from. This command will download all les from the entered website directory. The
parameters are case sensitive. Below are the explanations of what each of the parameters does.
-r is to allow recursive download. If this is absent, the command will only download the rst le
on the directory.
-np is short for no parent. It tells the command not to ascend to the parent directory. Without
this parameter, the command will ascent to and download les from the parent directories such
as example.com, example.com/dir1 and example.com/dir1/dir2.
-nH is short for no hostname. It tells the command not to create host directories.
The les will be downloaded onto the same directory as where the Wget.exe is. In the example above,
new directories will be automatically created within the C:\wget folder and the les will be downloaded
onto these directories.
-R parameter ignores certain le or type of le that you don’t want to download. For example, “-R
index.html” will tell the Wget command to skip the index.html le and not download it. “-R CSS” will
ignore all CSS les from the directory. Below is an example of using wget with -R parameter.
wget -r -np -nH -R index.html https://www.example.com/dir1/dir2/dir3
–cut-dirs parameter will tell the command how many directory you want to omit. For example, if you
download les from https://www.example.com/dir1/dir2/dir3 without cut-dirs (and with -nH), the
folder created on your PC will have the directory structure of dir1\dir2\dir3. If you want to ignore the
dir1\dir2 folders, you can use the –cut-dirs command to omit the directories. Here’s an example of
using wget with –cut-dirs parameter. Note that the –cut-dirs parameter has two dashes (-) in it.
Parameters are case sensitive. If you are using, for example, -A to lter download only certain type of
les, if you enter -a instead, it won’t work.
To view all other available parameters you can use with Wget, in the command prompt, type the
following command.
wget -help
Description for sharing: This guide shows how to download all les or only certain type of les from a
website directory or web folder using Wget in Windows 10.
We Recommend
How to Move Start Menu and Taskbar Icons To The Left in Windows 11
How to Find Recently Watched Videos on Facebook
About
Windows Digital is an independent tech website that contains articles, tips, how-to guides, tutorials, error xes, help,
support, news and downloads about Windows 10.
All product names, logos, copyrights, and trademarks mentioned are acknowledged as the registered intellectual
property of their respective owners.
This site is not in any way a liated with, nor has it been authorized, sponsored, or otherwise approved by, Microsoft
Corporation.
Site Author
Alvin Nyau
I'm the admin and founder of Windows Digital. I've been in the software industry for over 12 years, spending most of
my time working with Windows operating system. My objective is to create a portal to help Windows users solve
their PC problems.
Recent Posts
How To Play PC Games With PS5, PS4 Or Xbox Controller On Windows 11 October 21, 2021
How To Use Wireless Controller As Mouse And Keyboard In Windows 11 October 20, 2021
How To Take Ownership Of A File, Folder Or Drive In Windows 11 October 18, 2021
How To Restrict User Access To A Folder Or Drive In Windows 11 October 16, 2021