Advertisement
9usdfu98ds

empty_temp.bat

May 1st, 2023
2,129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. cd /D %temp%
  3. echo %CD% | find /I "AppData\Local\Temp" >NUL
  4. if NOT %ERRORLEVEL% EQU 0 exit
  5. takeown /R /F "%temp%\*" /D Y /SKIPSL >NUL
  6. icacls "%temp%\*" /reset /T /C >NUL
  7. attrib -R -S -H "%temp%\*" /S /D >NUL
  8. del /S /Q "%temp%\*" >NUL 2>&1
  9. for /D %%f in ("%temp%\*") do rd /S /Q "%%f" >NUL 2>&1
  10. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement