gpt4 book ai didi

Windows wget不下载文件但在浏览器中下载

转载 作者:可可西里 更新时间:2023-11-01 11:47:34 29 4
gpt4 key购买 nike

我正在尝试使用 wget(Windows 命令行端口)下载文件,但出现此错误..

--2016-12-06 12:36:11--  https://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/ExpressAdv064BIT/SQLEXPRADV_x64_ENU.exe
Resolving download.microsoft.com (download.microsoft.com)... 23.209.210.127
Connecting to download.microsoft.com (download.microsoft.com)|23.209.210.127|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2016-12-06 12:36:12 ERROR 404: Not Found.

使用相同的命令可以正常下载其他文件...

这是我试过的

"%~dp0wget" -c --show-progress --progress=bar:force:noscroll --no-check-certificate "https://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/ExpressAdv%2064BIT/SQLEXPRADV_x64_ENU.exe" -P C:\Temp

..和..

"%~dp0wget" -c --show-progress --progress=bar:force:noscroll --no-check-certificate https://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/ExpressAdv%2064BIT/SQLEXPRADV_x64_ENU.exe -P C:\Temp

我希望这是处理链接中 % 的报价问题,但没有成功。我也试过单引号,并在 % 前面放一个\来转义字符。

总是同样的错误。我想知道这个站点上的 wget 请求是否有一些服务器端限制。我可以绕过它吗?也许我需要一些其他开关?提前致谢。

最佳答案

当简单地从 cmd 运行时,您的命令可以工作,但是由于您是从批处理文件中运行它,您需要通过将百分号加倍来​​转义百分号,即:%%%

这给出了:

"%~dp0wget" -c --show-progress --progress=bar:force:noscroll --no-check-certificate "https://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/ExpressAdv%%2064BIT/SQLEXPRADV_x64_ENU.exe" -P C:\Temp

引用ss64.com :

Many characters such as \ = ( ) do not need to be escaped when they are used within a "quoted string" typically these are charcters you might find in a filename/path. The percent character is one exception to this rule, even though under NTFS % is a valid filename character.

关于Windows wget不下载文件但在浏览器中下载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40995833/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com