|
-
Jul 1st, 2010, 05:08 PM
#1
[RESOLVED] Best practice for deleting temp files (not internet cache)
I'd like to delete Windows temporary files in code, and was hoping there was a Windows API call for doing this as opposed to just using Kill or whatever. Unless that's the best way?
I've been using my own homegrown disk cleanup utility for years now, which deletes unwanted cookies, internet history, url typeahead, and temporary internet files. Plus it empties the recycle bin.
But I was just poking around my user profile and noticed the following folder:
C:\Documents and Settings\Ellis\Local Settings\Temp
This folder currently contains 10,786 files in 49 folders, using up 564 megs. This is surely slowing down my virus scanning if nothing else.
So I'd like to add the cleaning of that to my disk cleanup routine, but unfortunately it doesn't appear to be enumerated by SHGetFolderPath.
What is the best way to clear that path?
EDIT: Also, if there's a system-wide temp directory, as opposed to the user-specific temp files like in the above example, I'd like to be able to clear that too.
Last edited by Ellis Dee; Jul 1st, 2010 at 05:18 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|