Unsolved
This post is more than 5 years old
1.7K Posts
0
9509
August 26th, 2008 19:00
Quickly removing temp files
One of the most common problems when trying to use Office programs (or other programs) is having too many files in a user's temp folder. This can cause error messages or just slow down your PC. Rather than finding the UserName/Temp folder (it's hidden) and manually deleting these files, you can crate a batch file that will automate the process. Just do the following"
Open Notepad.
Type the following (or just copy and paste from here)
If using Windows Vista -
del /s/q "%userprofile%\Appdata\local\temp\*.*"
If using Windows XP
del /s/q "%userprofile%\Local Settings\temp\*.*"
Save the file as Killtemp.bat on your desktop. (Make sure you use the .bat extension and not .txt)
Close notepad and double click the newly created Killtemp.bat file. All temp files that are not in use will be deleted.
Note: I am not responsible for any typing errors that may cause this not to work


ConesE
2 Intern
•
131 Posts
0
August 27th, 2008 16:00
Allan, on XP, just %temp% is also the temp folder, and I've considered a bat file with del /s/q %temp%\*.* in the All Users startup. My thinking is that anything in the temp folder after log out needs to be gone, and this would run on login keeping the temp folder clean.
We have some users on an application that leaves several temp files behind every time they use it, and over a month's time it leaves hundreds of them. I've considered this bat file so I don't have to keep deleting them for them.
Is this a really goofy idea?
abach
1.7K Posts
0
August 27th, 2008 19:00
ConesE
2 Intern
•
131 Posts
0
August 29th, 2008 20:00
Allan, just an FYI . . .
On a couple of my users' machines, I created a bat file in "C:\Documents and Settings\All Users" (for lack of a better place) with a shortcut in "C:\Documents and Settings\All Users\Start Menu\Programs\Startup" and set that shortcut to run minimized. The users don't even notice it, and it appears to be deleting the Temp folder just fine on each startup.
It leaves any directory structure. I wish I knew a way to delete empty folders in DOS, but they shouldn't hurt anything.
Thanks for the original suggestion. It was the spark that made me realize that simple bat file may solve my problem.