Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;clears all (temp) files in the listed directories, except the one's which are in use
- ;C:\Users\Najeeb\AppData\Local\Temp
- dirs = %A_winDir%\Temp\*.*,%userprofile%\AppData\Local\Temp\*.*,C:\Temp\*.*,%userprofile%\Recent\*.*,%userprofile%\Cookies\*.txt,;%userprofile%\AppData\Local\Temporary Internet Files\*.* ;all code above is on ONE line
- Loop,parse,dirs,`,
- {
- IfExist,%A_LoopField%
- {
- Loop,%A_LoopField%,1,1
- FileSetAttrib,-H-S-R,%A_LoopField%,1,1
- }
- {
- Loop,%A_LoopField%,1,1
- FileRemoveDir,%A_LoopFileFullPath%,1
- FileDelete,%A_LoopField%
- }
- }
- FileRecycleEmpty
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement