【发布时间】:2016-08-31 19:09:46
【问题描述】:
我有一个包含 100 个 URL 的文本文件。这些 URL 再次包含不同的安装程序文件(.exe、.msi、.bat、.txt 等)
我需要使用 Invoke-WebRequest 将这些文件下载到我的本地机器上。但是如何在输出路径中不指定扩展类型的情况下下载文件呢?
文件.txt:
https://foo.com/path/to/file.exe?token=ahcdj009a
https://foo.com/path/to/file.msi?token=ansjndhkg
https://foo.com/path/to/file.lpr?token=553dndgbs
https://foo.com/path/to/file.txt?token=amnewa453
...etc
如何使用 Invoke-WebRequest PowerShell 命令将所有文件从 URL 下载到 Windows 本地计算机上?
【问题讨论】:
标签: powershell scripting