您是否曾经在网站的关键时刻丢失过重要资产?(Have you ever lost an essential asset at a crucial moment on your website?)想想都觉得害怕,不是吗?也许如果您使用过Linux,那么您可能听说过WGET。耶!WGET也可用于Windows。感谢 GNU(Thank GNU)为Windows 10提供兼容的WGET版本。从本文开始,您将了解如何下载和安装适用于Windows 10的(Windows 10)WGET。此外,您将学习如何使用WGET 命令(WGET command)以及提供的示例以提高您的理解。继续阅读以获得全面的知识WGET。
如何下载、安装和使用适用于 Windows 10 的 WGET(How to Download, Install, and Use WGET for Windows 10)
WGET已经为Linux用户提供了很长时间。学习者甚至可以参考网络上的不同文章和指南,以更好地理解。但是对于Windows 版本(Windows version),即使是数量稀少的文章也无法为您提供所需的信息。但是,不要失去希望。从现在开始,您将了解您从未听说过或阅读过的有关Windows上(Windows)WGET的信息。(WGET)那么为什么不从回答最常见的问题开始:什么是WGET?
什么是 WGET?(What is WGET?)
WGET是使用命令行(command line)下载文件和抓取网站的免费工具。在学习下载WGET以及如何通过示例使用WGET 命令(WGET command)之前,请查看以下几点以了解有关其功能的更多信息:
-
WGET 可以 从网页中( from web pages)检索(retrieve) 内容(contents)。
-
它甚至允许您以任何(in any )格式(format) (PDF、XML)
从任何网页(FTP、HTTP)下载。(download)
-
众所周知,提供 (provide )操作(operational) 匿名性 (anonymity )以将用户的位置或活动(location or activities)保密。
-
WGET在糟糕(n bad network condition)的网络条件下也能(s)完美运行(works perfectly i)。
-
除了这些功能之外,WGET还可以 覆盖链接中的(overwrite) 正确(correct domain) 域名(name)。
-
此外,它可以执行 (perform )递归下载(recursive downloads),其中下载文档(downloading document)中存在的链接(link present)会自动进一步下载。
另请阅读:(Also Read:)什么是命令行解释器(Command Line Interpreter)?
如何为 Windows 10 安装 WGET(How to Install WGET for Windows 10)
使用Windows 10的(Windows 10)WGET将通过使用命令从任何网页无缝下载和提取信息。执行以下步骤首先下载GnuWin以创建Windows 环境并使用 WGET(Windows environment and use WGET)。
1.从这里(here)下载GnuWin WGET。下载过程(download process)将在几秒钟内自动开始和完成。
2、点击下载的WGET setup.exe 文件夹打开,如下图。
3.出现提示时单击是。(Yes )
注意:(Note:) 确保(Make sure)在开始WGET 安装(WGET installation)之前关闭已经运行的应用程序。
4. 要安装WGET for Windows,请单击Next,如下图所示。
5. 选择我接受协议(I accept the agreement)单选按钮,然后单击下面突出显示的下一步(Next)选项以继续安装过程(installation process)。
6. 单击浏览(Browse)以选择目标(D)位置(estination Location)。选择要设置WGET 的文件夹,然后单击(WGET and click)下一步,(Next)如图所示。
注意:(Note:)建议使用默认路径:C:\Program Files (x86)\GnuWin32\bin
7. 在Binaries(Binaries) and Documentation中选择要安装的组件。单击下一步(Next)继续下一步。
8.在这里,单击浏览(Browse)并选择一个目标文件夹以(Destination Folder)在开始菜单中(program shortcut in the start menu)创建程序快捷方式。然后,单击下一步。(Next.)
注意:(Note:)如果您不想创建快捷方式,请选中复选框Don't create a Start Menu folder。
9. 选择您需要的附加图标(Additional icons),然后单击下一步(Next),如下图所示:
- 在开始菜单文件夹中创建文档快捷方式(Create document shortcuts in Start Menu folder)
- 下载源(Download Sources)
10.向下滚动(Scroll)查看选项卡(review tab)并检查是否存在所有所需选项。单击安装(Install)开始在您的系统上安装WGET 。
注意:(Note:)您可以选择返回(Back)来更改您需要修改的任何设置。
11. 等待WGET 安装(WGET installation)过程在您的 Windows 10desktop/laptop and click 完成(Finish)退出安装程序。
另请阅读:(Also Read:) 修复错误 1500(Fix error 1500)另一个安装正在进行中
如何在 Windows 10 中使用 WGET(How to Use WGET for Windows 10)
有两种方法(two ways)可以在您的系统上使用 WGET。
- 首先,它是通过命令提示符(Command Prompt)使用单一路径直接访问的。(directly via)
- 其次,您需要手动转到应用程序所在的(manually go to the) 目录页面(directory page),然后继续执行命令提示符过程。
您可以实现这些方法中的任何一种,以便在您方便的时候在您的系统上使用WGET 。因此,现在您将在下面看到这两种方法:
方法 1:将 CD 添加到 WGET 路径(Method 1: Add CD to WGET Path)
为Windows 10安装WGET后,请确保wget.exe 文件夹(wget.exe folder)存在于此方法中给出的路径中。
注意:(Note:)如果没有,请将相应的文件夹复制并粘贴(copy and paste)到下面文件资源管理器导航(File Explorer navigation)中显示的位置,因为您将只使用此路径。
1. 同时按Windows + E 键(keys)打开文件资源管理器(File Explorer)。
2. 导航到C:\Program Files (x86)\GnuWin32\bin并复制(copy)该位置。
3.在Windows 搜索栏中(Windows search bar)键入命令提示符(Command Prompt)并单击打开(Open)以启动它,如下所示。
4. 键入cd C:\Program Files (x86)\GnuWin32\bin并按Enter。
5. 然后输入wget并按Enter。如果执行了该命令,则表明WGET运行正常。
6A。键入Windows 10(Windows 10)命令所需的WGET以下载给定格式的任何文件:
wget [选项] ... [URL] ...(wget [OPTION] … [URL]…)
6B。或者,通过键入“wget –help”查看(‘wget –help’)WGET的帮助(WGET)
另请阅读:(Also Read:) 修复文件资源管理器在(Fix File Explorer)Windows 10中无响应
方法二:添加环境变量(Method 2: Add Environment Variable)
下载WGET for Windows 10后,您必须更改系统设置中设置的环境变量。这是一个漫长的过程。请仔细按照以下步骤为Windows 10设置WGET:
1. 按键盘上的Windows 键(key)并键入Control Panel。单击“打开(Open)”选项以启动它。
2. 选择查看方式:(View by:) 右上角的大(right corner)图标(Large icons)。单击(Click)系统选项(System)。
3. 向下滚动并单击高级系统设置(Advanced system settings),如下图所示。
4. 在高级(Advanced)选项卡中,单击环境变量(Environment Variables)按钮,如图所示。
5.将出现环境变量(Environmental Variables )弹出窗口(pop-up window)。在绿色(User variables for GREEN)类别的用户变量下选择路径(Path) ,然后单击编辑(Edit),如下所示。
6. 在编辑环境变量(Edit environmental variable )窗口中,选择浏览(Browse)选项。
7. 在路径中选择C:\Program Files (x86)\GnuWin32\bin OK,如图所示。
8. 然后,如图所示单击确定。(OK)
9. 再次单击“系统属性”窗口中的“确定”。(OK)
10. 现在,按照方法 1(Method 1)中的说明打开命令提示符(Command Prompt)。
11. 键入wget并按键盘上的Enter 。设置环境变量(Environment Variable)后,无论您当前位于任何文件夹中,都可以运行WGET 。
另请阅读:(Also Read:)如何修复 Git 合并错误
如何检查 WGET 应用程序和命令的功能(How to Check the Functioning of WGET App and Commands)
要检查您是否可以访问适用于Windows 10的(Windows 10)WGET (无论存在任何文件夹或目录(folder or directory)),请按照以下步骤操作:
1.在开始菜单搜索栏中(start menu search bar and click)键入命令提示符,然后单击(Command Prompt)打开(Open)以启动它。
2.输入wget,回车(Enter)查看应用是否运行。
注意:(Note: )如果您收到无法识别的命令(unrecognized command)错误,则说明您从错误的来源下载了(wrong source)WGET 安装程序(WGET Setup)。因此,请确保仅使用上面给出的链接进行下载(download process),然后重试。
3A。如果测试成功了,那就太好了。你做得很好!
3B。如果它不起作用,请不要担心。检查您是否按顺序执行了这些步骤,从下载GnuWin,安装WGET Setup,然后添加WGET 环境(WGET environment)变量。再试一次并重新启动命令行(command line)。
另请阅读:修复(Also Read:) Google Chrome中的ERR_EMPTY_RESPONSE(Fix ERR_EMPTY_RESPONSE)
如何通过示例使用 WGET 命令(How to Use WGET Command with Examples)
有数千个WGET命令可以执行特定任务。使用上面给出的任何方法运行Windows 10的(Windows 10)WGET(Run WGET),并在命令提示符(Command Prompt)中键入下面列出的任何命令。
注意:(Note:)您需要正确输入命令才能获得所需的结果。
1. 要获取命令列表,请使用命令wget -h。
2. 要下载单个文件,请使用命令wget [URL]。例如,输入命令wget https://wordpress.org/latest.zip。这里选择WordPress作为示例。
3. 要下载到特定文件夹,请使用命令wget -P [wanted directory] [URL]。例如,wget -P /temp https://github.com/git/git/archive/master.zip.
4. 要恢复中断的下载,请使用命令wget -c [URL]。例如,wget -c https://wordpress.org/latest.zip.
5. 要设置下载速度(download speed),请使用命令wget ‐‐limit-rate [wanted speed] [URL]。例如,wget –limit-rate 1m https://wordpress.org/latest.zip.
6. 要镜像单个网页,请使用命令wget -m [URL]。例如,wget -m https://cereal.guru/.
7. 要知道安装的WGET的版本,然后使用命令wget -V。
8. 要以特定名称下载和保存,请使用命令wget -o [file name] [URL]。例如,wget -o file.docx https://cereal.guru/。
9. 要在后台下载网页,请使用命令wget -b [URL]。例如,wget -b https://cereal.guru/.
10. 要下载多个URL(URLs),请使用命令wget -i [File name]。例如,wget -i URL.txt。在执行此命令之前,请将所有URL(URLs)放在一个文件中,并将该文件名(file name)包含在命令中。
11. 要通过FTP下载,请使用命令wget –ftp-user=[ftp_username] –ftp-password=[ftp_password] ftp://…例如wget –ftp-user=sofiftp –ftp-password=TopSecretPassword ftp://123.456.7890.
12. 要更改重试次数,请使用命令wget –tries=[number_of_tries] [URL]。例如,wget –tries=inf https://cereal.guru/。在本例中,inf 表示无穷大。默认(default number)重试次数为 20。
这是如何通过示例使用WGET 命令(WGET command)。单击(Click) 此处(here)了解更多命令及其用途。
推荐的:(Recommended:)
- 修复(Fix)Windows 10更新错误 0x80070103(Update Error 0x80070103)
- 如何在 Windows 10 中启用 Telnet
- Windows 11 运行(Run) 命令(Commands)的完整列表
- Discord 命令列表
我们希望本指南对您有所帮助,您可以了解如何下载、安装和使用适用于 Windows 10 的 WGET。(how to download, install & use WGET for Windows 10.)如果您有任何疑问或建议,请随时在下面的评论部分中提出。
How to Download, Install, and Use WGET for Windows 10
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.
Also Read: What is a Command Line Interpreter?
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.
1. Download GnuWin WGET from here. The download process will start and finish automatically in a few seconds.
2. Click the downloaded WGET setup.exe folder to open it, as shown below.
3. Click Yes when prompted.
Note: Make sure to close already running applications before starting WGET installation.
4. To install WGET for Windows, click on Next, as depicted below.
5. Select the I accept the agreement radio button and click the Next option as highlighted below to continue the installation process.
6. 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
7. Select the components you want to install among Binaries and Documentation. Click Next to proceed further.
8. 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.
9. Select the Additional icons you need and click Next as illustrated below:
- Create document shortcuts in Start Menu folder
- Download Sources
10. 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.
11. Wait for the WGET installation process to complete in your Windows 10 desktop/laptop and click Finish to exit the setup.
Also Read: Fix error 1500 Another Installation is in Progress
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.
1. Press Windows + E keys simultaneously to open File Explorer.
2. Navigate to C:\Program Files (x86)\GnuWin32\bin and copy the location.
3. Type Command Prompt in the Windows search bar and click Open to launch it, as shown below.
4. Type cd C:\Program Files (x86)\GnuWin32\bin and press Enter.
5. 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’
Also Read: Fix File Explorer Not Responding in Windows 10
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:
1. Press the Windows key from the keyboard and type Control Panel. Click the Open option to launch it.
2. Choose View by: Large icons from the top right corner. Click on the System option.
3. Scroll down and click on the Advanced system settings as illustrated below.
4. In the Advanced tab, click the Environment Variables button as shown.
5. Environmental Variables pop-up window will appear. Select the Path under the User variables for GREEN category and click on Edit as depicted below.
6. In the Edit environmental variable window, select the Browse option.
7. Select C:\Program Files (x86)\GnuWin32\bin path and click OK as shown.
8. Then, click OK as shown.
9. Again, click OK in the System Properties window.
10. Now, open Command Prompt as explained in Method 1.
11. 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.
Also Read: How to Fix Git Merge Error
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:
1. Type Command Prompt on the start menu search bar and click Open to launch it.
2. 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.
Also Read: Fix ERR_EMPTY_RESPONSE in Google Chrome
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.
1. To get list of commands, use the command wget -h.
2. 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.
3. 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.
4. To resume an interrupted download, use the command wget ‐c [URL]. For instance, wget -c https://wordpress.org/latest.zip.
5. 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.
6. To mirror a single webpage, use the command wget -m [URL]. For instance, wget -m https://cereal.guru/.
7. To know the version of installed WGET, then use the command wget -V.
8. 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/.
9. To download a web page in the background, use the command wget -b [URL]. For instance, wget -b https://cereal.guru/.
10. 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.
11. 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.
12. 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.
Recommended:
We hope that this guide was helpful and you could learn how to download, install & use WGET for Windows 10. If you have any queries or suggestions, feel free to drop them in the comments section below.