我来自Linux/Unix背景,我一直在想Windows是否有可以从控制台下载文件的二进制文件。
我想自动化一个特定的过程和我的要求之一,它不安装太多的软件,但使用内置的东西尽可能多。
谢谢!
发布于 2013-03-01 13:00:31
Windows中没有类似于内置命令的wget。您可以通过Windows使用.net框架,如下面的示例所示:
https://superuser.com/questions/362152/native-alternative-to-wget-in-windows-powershell
或者像我一样使用wget for Windows:
发布于 2014-05-17 19:14:16
Windows 10包括curl.exe
:
https://techcommunity.microsoft.com/t5/containers/-/ba-p/382409
所以你可以这样做:
# example 1
curl.exe --output index.html --url https://superuser.com
# example 2
curl.exe -o index.html https://superuser.com
如果您有旧的Windows,您仍然可以下载它:
# example 1
Invoke-WebRequest -OutFile index.html -Uri https://superuser.com
# example 2
iwr -outf index.html https://superuser.com
https://docs.microsoft.com/powershell/module/microsoft.powershell.utility/invoke-webrequest
发布于 2014-09-25 13:10:04
我喜欢http-ping实用程序。您可以使用以下设置运行: ping一次,并将内容保存到google.html
http-ping.exe -n 1 http://www.google.com/ -f google.html
它不需要安装。查看有关http-ping的更多信息
https://serverfault.com/questions/483754
复制相似问题