From 45a16346e4a0bb9a288dd41b27f1733dc1175d05 Mon Sep 17 00:00:00 2001 From: romanitho <96626929+Romanitho@users.noreply.github.com> Date: Fri, 3 Jun 2022 20:54:41 +0200 Subject: [PATCH] Exclude log files when forcing reinstall --- Winget-AutoUpdate-Install.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Winget-AutoUpdate-Install.ps1 b/Winget-AutoUpdate-Install.ps1 index 43e056d..44046fe 100644 --- a/Winget-AutoUpdate-Install.ps1 +++ b/Winget-AutoUpdate-Install.ps1 @@ -172,7 +172,7 @@ function Install-WingetAutoUpdate{ New-Item -ItemType Directory -Force -Path $WingetUpdatePath | Out-Null } else { - Remove-Item -Path "$WingetUpdatePath\*" -Recurse -Force + Remove-Item -Path "$WingetUpdatePath\*" -Exclude *.log -Recurse -Force } Copy-Item -Path "$PSScriptRoot\Winget-AutoUpdate\*" -Destination $WingetUpdatePath -Recurse -Force -ErrorAction SilentlyContinue