@echo off
rem --------------------------------------------------------------------------
rem Downloads content from [URL] to [OUTFILE] (must be an abs path).
rem
rem Using:
rem
rem download [URL] [OUTFILE]
rem
rem --------------------------------------------------------------------------
setlocal
set url=%~1
set outfile=%~2
call powershell -command ^
"Invoke-WebRequest -UseBasicParsing -Uri '%url%' -OutFile '%outfile%'"
endlocal
modify to:
@echo off
rem --------------------------------------------------------------------------
rem Downloads content from [URL] to [OUTFILE] (must be an abs path).
rem
rem Using:
rem
rem download [URL] [OUTFILE]
rem
rem --------------------------------------------------------------------------
setlocal
set url=%~1
set outfile=%~2
call powershell -command ^
"Set-Variable ProgressPreference SilentlyContinue ; Invoke-WebRequest -UseBasicParsing -Uri '%url%' -OutFile '%outfile%'"
endlocal
i.e. in powershells 5.1 (default for windows 10)
This command because of progress bar 50x-100x times slower than other alternatives or without the bar (on fast connections).
Why is it a problem?
Because of Win10 sdk download.
Original file:
modify to:
Problem with very slow Invoke-WebRequest explained here: https://stackoverflow.com/questions/28682642/powershell-why-is-using-invoke-webrequest-much-slower-than-a-browser-download
Or https://github.com/PowerShell/PowerShell/issues/2138
i.e. in powershells 5.1 (default for windows 10) This command because of progress bar 50x-100x times slower than other alternatives or without the bar (on fast connections).
Why is it a problem? Because of Win10 sdk download.