The useful command line tool wget which is available in Linux can also be used in Windows. This tool can download web pages and files right from the command prompt.
First, download and install wget setup from here.
Once installed, it will be available in the bin folder.
To use it, open Windows command prompt (Win key + R and type cmd in the Run box) , then change the directory to this bin folder :
cd C:\Program Files\GnuWin32\bin>
Downloading webpages and files : Using wget is simple. Enter a URL to specific file or a page that needs to be downloaded.
If the remote server allows it, then the contents can be downloaded. To exit, press Ctrl+C anytime.
To get an idea of available parameters that can be used with wget, type :
wget -h
There are commonly used options with wget which make it effective.
Resume interrupted downloads : To resume downloads when interrupted, use the -c parameter :
wget -c pathtofileorurl
In some cases where specifying a https url shows error, use the –no-check-certificate option.
Save downloaded files to specific folders :
By default, downloads are stored in Users\username\AppData\Local\VirtualStore\Program Files\GnuWin32\bin.
To save these to another path, use the directory-prefix with double dashes before it :
wget –directory-prefix=<PATH>
So to save contents to a folder named Contents, simply give the full path as :
wget -c –directory-prefix=E:\Contents pathtofileorurl
The below example shows how files can be downloaded from Windows command prompt using wget. The destination folder where they will be saved is E:\Txdlds and the parameters specified include -c and –directory-prefix .
Batch downloading using an input file : wget can even parse for URLs from a file and then download from them automatically. This is through the -i parameter.
First, create a file with the links from where contents need to be downloaded.
Next, include it when running wget. Specify the full path of this input text file just as in when choosing a download folder along with the previous parameters.
All done.