如何创建从https://www.sample.com/downloads/filename.exe下载并跟踪它的批处理文件(echo%percent%complete ...)?
答案 0 :(得分:0)
以下是一个例子:
@echo off
Mode 110,12
Title Download with BITS Transfer
set "URL=http://devbuilds.kaspersky-labs.com/devbuilds/KVRT/latest/full/KVRT.exe"
for %%a in ("%URL%") do set "SaveAsFile=%%~nxa"
powershell "Import-Module BitsTransfer; Start-BitsTransfer '%URL%' '%SaveAsFile%'"
Start "" "%SaveAsFile%"