From 9c0008eb6712af7cf7973c4d800786655c107b50 Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Fri, 23 Mar 2018 15:46:31 +0100 Subject: [PATCH] Variable error in DelFile() --- cleanW10.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cleanW10.ps1 b/cleanW10.ps1 index 20370ac..b119327 100755 --- a/cleanW10.ps1 +++ b/cleanW10.ps1 @@ -395,7 +395,7 @@ function DelFile { Write-Host -ForegroundColor Yellow "not found" return } - $command = "Remove-Item $command -ErrorAction SilentlyContinue -Force -Path `"$path`"" + $command = "Remove-Item $path -ErrorAction SilentlyContinue -Force -Path `"$path`"" if ( $params.ContainsKey('recurse') -and $params.recurse -eq $true ) { $command += "-Recurse" } @@ -500,3 +500,4 @@ catch { Write-Host -NoNewline -ForegroundColor Red "Error`n`t" Write-Host -ForegroundColor DarkRed $Error[0].Exception.Message } +ri \ No newline at end of file