$choice = Read-Host "Select option (1-4)"
Write-Host "Desktop shortcut created!" -ForegroundColor Green function Create-ScheduledTask $taskName = "WindowsTempCleaner" $scriptPath = $MyInvocation.MyCommand.Path windows 11 clear temp files
# 5. Recycle Bin $locations += @Path = "RecycleBin"; Name = "Recycle Bin" &1 rmdir /q /s "%SystemRoot%\Temp" >
return $totalFreed
function Create-Shortcut $shortcutPath = "$env:USERPROFILE\Desktop\Clear Temp Files.lnk" $scriptPath = $MyInvocation.MyCommand.Path &1 mkdir "%SystemRoot%\Temp" >
echo Cleaning system temp... del /q /f /s "%SystemRoot%\Temp*" > nul 2>&1 rmdir /q /s "%SystemRoot%\Temp" > nul 2>&1 mkdir "%SystemRoot%\Temp" > nul 2>&1