From cbc435904f100cbfbf0d795d0b475d68db508b3e Mon Sep 17 00:00:00 2001 From: breadcat Date: Wed, 15 Jul 2020 15:49:16 +0100 Subject: Loop shortcut deletion --- win10-prep.bat | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/win10-prep.bat b/win10-prep.bat index a7979a3..0f1306c 100644 --- a/win10-prep.bat +++ b/win10-prep.bat @@ -421,10 +421,5 @@ rd /s /q ".rsrc" && del ".data" ".rdata" ".reloc" ".text" "CERTIFICATE" "WebpCod exit /b %errorlevel% :cleanup -if exist "%userprofile%\Desktop\*.lnk" del "%userprofile%\Desktop\*.lnk" -if exist "%allusersprofile%\Desktop\*.lnk" del "%allusersprofile%\Desktop\*.lnk" -if exist "%userprofile%\Desktop\*.appref-ms" del "%userprofile%\Desktop\*.appref-ms" -if exist "%allusersprofile%\Desktop\*.appref-ms" del "%allusersprofile%\Desktop\*.appref-ms" -if exist "%public%\Desktop\*.lnk" del "%public%\Desktop\*.lnk" -if exist "%public%\Desktop\*.lnk" del "%public%\Desktop\*.lnk" +for %%x in (%userprofile%\Desktop\*.lnk %allusersprofile%\Desktop\*.lnk %userprofile%\Desktop\*.appref-ms %allusersprofile%\Desktop\*.appref-ms %public%\Desktop\*.lnk) do if exist "%%x" del "%%x" exit /b %errorlevel% -- cgit v1.2.3