From fa7d942a8fb3c8da4136fa0435d08e07bf7375af Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Mon, 25 Nov 2024 15:03:16 +0100 Subject: [PATCH] optimize download without progressbar --- util/windows.psm1 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/util/windows.psm1 b/util/windows.psm1 index ab919b0..d97d27e 100644 --- a/util/windows.psm1 +++ b/util/windows.psm1 @@ -78,9 +78,16 @@ function ProcessUrlFiles param ( [string]$source, [Parameter(Mandatory=$false)][string]$destination, - [Parameter(Mandatory=$false)][string]$fileExt + [Parameter(Mandatory=$false)][string]$fileExt, + [bool]$progress=$true ) + # Disable progressbar for faster download + $progressPreference = 'continue' + if (-not $progress) + { $progressPreference = 'silentlyContinue' + } + # Ensure the destination directory exists if ($destination -and (-not (Test-Path $destination))) {