Advertisement
Najeebsk

TEMP-ALL-DELL.ahk

Apr 29th, 2024
663
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;clears all (temp) files in the listed directories, except the one's which are in use
  2. ;C:\Users\Najeeb\AppData\Local\Temp
  3. dirs = %A_winDir%\Temp\*.*,%userprofile%\AppData\Local\Temp\*.*,C:\Temp\*.*,%userprofile%\Recent\*.*,%userprofile%\Cookies\*.txt,;%userprofile%\AppData\Local\Temporary Internet Files\*.*,C:\Windows\Prefetch\*.* ;all code above is on ONE line
  4. Loop,parse,dirs,`,
  5. {
  6.    
  7. IfExist,%A_LoopField%
  8.    {
  9.    Loop,%A_LoopField%,1,1
  10.    FileRemoveDir,%A_LoopFileFullPath%,1
  11.    FileDelete,%A_LoopField%
  12.    }
  13. }
  14. FileRecycleEmpty
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement