FredixBlog


Just my log about anything I could find enjoyable.



TMP files

author Posted by: fredometro on date Jan 6th, 2004 | filed Filed under: MS-Access

Quertion: Is there ever any reason to keep TMP files (or files in the TEMP or WINDOWS/TEMP folders)? Can they be routinely deleted to recover disk space, say on a daily basis, like internet cache files?
Hi!

Yes, the temp folder can be cleared daily, there is no reason to keep these files, unless during downloads or installing programs.

You can create a small command file to do this. In the notepad, enter these lines:

rem deleting all temp files
del c:\\windows\\temp\\*.* /S /Q
rem removing the temp folder
rd c:\\windows\\temp /S /Q
rem recreating the temp folder
md c:\\windows\\temp

Name this file with a BAT extension, for instance CLEARTMP.BAT, save it.

When you double-click this file, all your temp files are deleted. Do this from time to time, but not while downloading from the net, neither while installing programs, as needed files may be there at this moment.

I hope this makes sense to you.

“Here is a CleanupTemp.BAT script for windows NT, 2000 & XP

del /F /Q /S “”c:\\documents and settings\\local settings\\temp\\*.*”"
rmdir /S /Q “”c:\\documents and settings\\local settings\\temp”"

del /F /Q /S “”c:\\documents and settings\\local settings\\temporary internet files\\*.*”"
rmdir /S /Q “”c:\\documents and settings\\local settings\\temporary internet files”"

del /F /Q /S “”c:\\windows\\temp\\*.*”"
rmdir /S /Q “”c:\\windows\\temp”"

REM Removing temp files for users
del /F /Q /S “”c:\\documents and settings\\User1\\local settings\\temp\\*.*”"
rmdir /S /Q “”c:\\documents and settings\\User1\\local settings\\temp”"
del /F /Q /S “”c:\\documents and settings\\User1\\local settings\\temporary internet files\\*.*”"
rmdir /S /Q “”c:\\documents and settings\\User1\\local settings\\temporary internet files”"

del /F /Q /S “”c:\\documents and settings\\User2\\local settings\\temp\\*.*”"
rmdir /S /Q “”c:\\documents and settings\\User2\\local settings\\temp”"
del /F /Q /S “”c:\\documents and settings\\User2\\local settings\\temporary internet files\\*.*”"
rmdir /S /Q “”c:\\documents and settings\\User2\\local settings\\temporary internet files”"

del /F /Q /S “”c:\\documents and settings\\Administrator\\local settings\\temp\\*.*”"
rmdir /S /Q “”c:\\documents and settings\\Administrator\\local settings\\temp”"

del /F /Q /S “”c:\\documents and settings\\Administrator\\local settings\\temporary internet files\\*.*”"
rmdir /S /Q “”c:\\documents and settings\\Administrator\\local settings\\temporary internet files”"

del /F /Q /S “”c:\\documents and settings\\local settings\\temp\\*.*”"
rmdir /S /Q “”c:\\documents and settings\\local settings\\temp”"

del /F /Q /S “”c:\\temp\\*.*”"
rmdir /S /Q “”c:\\temp”"

del /F /Q /S “”c:\\tmp\\*.*”"
rmdir /S /Q “”c:\\tmp”"”