Wget is a free ftp download manager. It is a command line tool and supports HTTP, HTTPS and FTP connections. It is a non-interactive tool, that means it does not have an interface like most of the File Downloaders out there. It is a command line tool, this makes it best for batch files, it supports HTTP and FTP servers that requires authentication, it can mirror website recursively, can run in the background and download files, can resume an incomplete download, can read a file with a list of URLs, can maintain log and support proxies. It can also run in quiet mode that makes it the right tool to be used in batch files. It run on all versions of Windows.
Yes, it doesn’t have an interface, but that is the sole purpose for it to exist. It can be your best choice if you want to download files on command line. It runs on all versions of Windows. Without any further ado, let us discuss some of the features and uses of this software.
How to Use Wget?
Simple open the plain old command prompt by clicking on “Start” and type in “cmd” in the “Search bar” (Type in “cmd” in Run dialog box if you’re using Windows XP). Now once you get to the directory where you put “wget.exe”, simple type in “wget –help” and it will show you all the options available.
As I mentioned in the beginning, Wget is completely command prompt based. If that is not what you want, you can try these traditional FTP software with GUI.
How to download a file with wget?
Downloading a file is easy with wget. Just provide the URL (address) of the file you want to download.
Ex: wget http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/0.9.1/FirefoxSetup-0.9.1.exe
The above line will download Mozilla Firefox from the Mozilla’s FTP server.
If you’re trying to download a file from a website that requires a username and password, you can specify the username and password as a parameter.
Ex: wget –user=yourusername –password=yourpassword http://www.somesecurewebsite.com/filetodownload.exe
Resume an incomplete download
Your download was interrupted while working on a Wi-Fi connection. Not to worry, wget can resume the incomplete download.
This is how you do it: wget –continue http://www.thewebsite.com/filetodownload.txt
Wget can mirror website
You found a really good website with tutorials and lots of learning material, or may be a online library with lots of e-books. You don’t want to open each page and save it manually but somehow, you want to save the entire website if possible. Well, wget can mirror the entire website to you computer recursively, copying each and every detail, with the all the hyperlinks of the website in place. You can tell wget to write every action it performed, to a log file.
This is how we do this: wget –mirror –recursive –o log.txt http://www.thewebsite.com
This will mirror the website recursively, and write a log to log.txt for later reference. Or, you can simply use an Offline Browser.
Working with FTP
Here, we’re going to see how to download files from an FTP server. The FTP server you’re trying to download the file from, might require authentication. Wget supports FTP readily. This is how we do it:
wget ftp://ftp.mozilla.org/pub/mozilla/releases/mozilla1.7.3/mozilla-win32-1.7.3-installer.exe
Mozilla’s FTP server requires you to login before you can retrieve files, so wget will try to login as “anonymous” user automatically.
For servers that requires authentication:
wget –user=yourusername –password=youpassword ftp://ftp.yourftpserver.com/filetodownlad.txt
Specifying a list of URLs and files
You can specify a file with a list of URLs for the files you want to download. The URLs can be for an HTTP or an FTP server, with one URL per line. You can also let wget know that its an HTML file that you want it to read from.
Ex: wget -i filewithurl.txt
For HTML files: wget –i –force-html thehtmlfile.txt
Running undercover
Wget can run in the background as a process and continue to download. This is a useful feature when you don’t want the black window to stay there on the screen while wget is in the process of downloading. It is also useful in case you use wget in your script and don’t want the script to wait for wget to finish the download, but carry on with other tasks while the wget is downloading the file.
This is how you do it: wget –background ftp://ftp.mozilla.org/pub/mozilla/releases/mozilla1.7.3/mozilla-win32-1.7.3-installer.exe
Using Proxies with Wget
To use proxies with wget, you need to set an environment variable with the proxy’s information.
Ex: set http_proxy=http://www.proxyserver.com:8080
Once this is done, simple use the “–proxy” switch to use the proxy. To turn it off, use –no-proxy.
Some other Options
To specify a timeout after which wget should quit trying to download the file: –timeout=NoOfSeconds
To limit the download rate, add this switch to the command line: –limit-rate=RATE
To hide the identity of wget and make it look like its a browser, add this switch: –user-agent=AGENT. User Agent is a string used by browsers to identify themselves while talking to web servers. You can search for user-agent string for your browser and specify it in the command line. Here are user-agent strings for some popular browsers:
Mozilla Firefox: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0
Google Chrome: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36
Safari: Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d Safari/8536.25
Opera: Opera/9.80 (Windows NT 6.0) Presto/2.12.388 Version/12.14
This option comes handy while using wget with websites that rejects requests from website mirroring softwares.
Conclusion
Wget is really good while you’re working with scripts or batch files. The website mirroring feature makes it a good tool to make local copies of an online content. It can resume an incomplete download, so you don’t have to download the whole file again. One of the features that I liked the most was that it can support FTP servers and proxies. You can specify a file with URLs that you want to download. Wget can run in the background. This can be useful if you want to schedule downloads with Task Scheduler or any other task scheduler.
Of course, there are many other better looking full-fledged download managers, but if you want a command line download manager, then this would probably be the best choice for you.