Have you ever lost an essential asset at a crucial moment on your website? It is frightening to even think about it, isn’t it? Perhaps if you have used Linux, then you might have heard of WGET. Yay! WGET is also available for Windows. Thank GNU for coming up with a compatible version of WGET for Windows 10. From the starting of this article, you will understand how to download and install WGET for Windows 10. Also, you will learn how to use WGET command with examples provided for improving your understanding. Keep on reading to gain comprehensive knowledge about WGET.
How to Download, Install, and Use WGET for Windows 10
WGET has been available for Linux users for a long time. Learners can even refer to the different articles and guides available on the web to better their comprehension. But when it comes to the Windows version, even the scarce amount of articles cannot give you the information you need. However, do not lose hope. From this point on, you will know things about WGET on Windows that you’ve never heard or read. So why not start with answering the most asked question: What is WGET?
What is WGET?
WGET is a free tool to download files and crawl websites using the command line. Before learning to download WGET and how to use WGET command with examples, check out the points given below to know more about its features:
- WGET can retrieve contents from web pages.
- It even allows you to download from any web pages (FTP, HTTP) in any format (PDF, XML).
- It’s known to provide operational anonymity to keep users’ location or activities a secret.
- WGET works perfectly in bad network conditions too.
- Apart from these features, WGET can overwrite correct domain name in links.
- Moreover, it can perform recursive downloads, where the link present in the downloading document gets automatically downloaded further.
How to Install WGET for Windows 10
Using WGET for Windows 10 will seamlessly download and extract information from any webpage by using commands. Implement the steps below to download GnuWin first to create a Windows environment and use WGET.
- Download GnuWin WGET from here. The download process will start and finish automatically in a few seconds.
- Click the downloaded WGET setup.exe folder to open it, as shown below.
Note: Make sure to close already running applications before starting WGET installation.
- Select the I accept the agreement radio button and click the Next option as highlighted below to continue the installation process.
- Click on Browse to select the Destination Location. Choose a folder where you want to set up WGET and click on Next as shown.
Note: It is recommended to use default path: C:\Program Files (x86)\GnuWin32\bin
- Here, click on Browse and select a Destination Folder to create the program shortcut in the start menu. Then, click on Next.
Note: If you don’t want to create a shortcut, select the checkbox Don’t create a Start Menu folder.
- Select the Additional icons you need and click Next as illustrated below:
- Create document shortcuts in Start Menu folder
- Download Sources
- Scroll down the review tab and check if all the desired options are present. Click Install to begin installing WGET on your system.
Note: You can select Back to change any setting you need to modify.
- Wait for the WGET installation process to complete in your Windows 10 desktop/laptop and click Finish to exit the setup.
How to Use WGET for Windows 10
There are two ways to use WGET on your system.
First, it is accessed directly via Command Prompt using a single path.
Second, you need to manually go to the directory page where the app is present, and then proceed to the command prompt procedure.
You can implement any of these methods to use WGET on your system at your convenience. So, now you will see both methods in action below:
Method 1: Add CD to WGET Path
Once you install WGET for Windows 10, ensure that the wget.exe folder exists in the path given in this method.
Note: If not, copy and paste the respective folder in the location shown in the below File Explorer navigation, as you are about to use only this path.
- Press Windows + E keys simultaneously to open File Explorer.
- Navigate to C:\Program Files (x86)\GnuWin32\bin and copy the location.
Type Command Prompt in the Windows search bar and click Open to launch it, as shown below.
- Type cd C:\Program Files (x86)\GnuWin32\bin and press Enter.
- Then type wget and hit Enter. If the command is executed, it shows that WGET is running properly.
6A. Type the required WGET for Windows 10 command to download any file in the given format:
wget [OPTION] … [URL]…
6B. Or, view help from WGET by typing ‘wget –help’
Method 2: Add Environment Variable
Once you download WGET for Windows 10, you must change the environmental variable set in the system settings. This is a long process. Follow the steps below carefully to set up WGET for Windows 10:
- Press the Windows key from the keyboard and type Control Panel. Click the Open option to launch it.
- Choose View by: Large icons from the top right corner. Click on the System option.
- Scroll down and click on the Advanced system settings as illustrated below.
- In the Advanced tab, click the Environment Variables button as shown.
- Environmental Variables pop-up window will appear. Select the Path under the User variables for GREEN category and click on Edit as depicted below.
- In the Edit environmental variable window, select the Browse option.
- Select C:\Program Files (x86)\GnuWin32\bin path and click OK as shown.
Then, click OK as shown.
- Again, click OK in the System Properties window.
- Now, open Command Prompt as explained in Method 1.
- Type wget and press Enter on the keyboard. Once the Environment Variable is set, you will be able to run WGET regardless of any folder you are currently in.
How to Check the Functioning of WGET App and Commands
To check if you can access WGET for Windows 10 regardless of any folder or directory that is present, follow the steps given below:
- Type Command Prompt on the start menu search bar and click Open to launch it.
- Type wget and press Enter to check whether the application runs.
Note: If you receive unrecognized command error, you have downloaded the WGET Setup from the wrong source. So, ensure to use only the link given above for the download process and try again.
3A. If the test worked, then it’s great. You have done a good job!
3B. If it is not working, do not worry. Check if you have followed the steps in an orderly manner, from downloading GnuWin, installing WGET Setup, then adding WGET environment variable. Try once again and restart the command line.
How to Use WGET Command with Examples
There are thousands of WGET commands to perform specific tasks. Run WGET for Windows 10 using any of the methods given above and type any of the commands listed below in Command Prompt.
Note: You need to enter the command correctly to obtain desired results.
- To get list of commands, use the command wget -h.
- To download a single file, use the command wget [URL]. For instance, enter the command wget https://wordpress.org/latest.zip. Here, WordPress is chosen as an example.
- To download to a specific folder, use the command wget ‐P [wanted directory] [URL]. For instance, wget -P /temp https://github.com/git/git/archive/master.zip.
- To resume an interrupted download, use the command wget ‐c [URL]. For instance, wget -c https://wordpress.org/latest.zip.
- To set the download speed, use the command wget ‐‐limit-rate [wanted speed] [URL]. For instance, wget –limit-rate 1m https://wordpress.org/latest.zip.
- To mirror a single webpage, use the command wget -m [URL]. For instance, wget -m https://cereal.guru/.
- To know the version of installed WGET, then use the command wget -V.
- To download and save under a specific name, use the command wget -o [file name] [URL]. For instance, wget -o file.docx https://cereal.guru/.
- To download a web page in the background, use the command wget -b [URL]. For instance, wget -b https://cereal.guru/.
- To download multiple URLs, use the command wget -i [File name]. For instance, wget -i URL.txt. Before executing this command, place all the URLs in one file and include that file name in the command.
- To download via FTP, use the command wget –ftp-user=[ftp_username] –ftp-password=[ftp_password] ftp://… For instance, wget –ftp-user=sofiftp –ftp-password=TopSecretPassword ftp://123.456.7890.
- To change the number of retry attempts, use the command wget –tries=[number_of_tries] [URL]. For instance, wget –tries=inf https://cereal.guru/. In this example, inf denotes infinity. The default number of retries is 20.
This is how to use WGET command with examples. Click here to know about more commands and their uses.