Wednesday, September 3, 2008

Managing Temporary Files

A temporary file (temp file) is just that—temporary. It is designed to store information for a short
period of time and then be deleted. Almost every program of any size today uses temp files. There
is one problem, however: Often, the temp files become more permanent. Eventually, they begin
taking up considerable disk space.
One thing you can do to improve system performance is to delete any temporary files that
exist on your system. Temp files can be found in a variety of locations, including the following:
C:\Temp
C:\Tmp
C:\Windows\Temp
C:\Windows\Tmp
The way to know for sure where they’re located is to determine what values the TEMP and
TMP environment variables are set to. An environment variable is a setting that stays permanent
throughout a Windows or DOS session. It is set by an entry in an .INI file, the Registry,
or one of the MS-DOS configuration files (CONFIG.SYS or AUTOEXEC.BAT).
To find out where the temporary files are stored in your machine, start a command-line session
(choose Start  Run and type in either CMD or COMMAND). At the command prompt, type
SET. This command returns all the environment variables for your system. Look for TEMP= or
TMP= (or both). These variables point to directories on your hard disk; in these locations, you
will find the temporary files.
In Windows XP, you can find where your temp files are going by opening the System control
panel, clicking the Advanced tab, and then the Environment Variables button. The temp location
will be shown in the User Variables box at the top as well as the System Variables at the bottom.
After you have found the temporary files, use Windows Explorer to delete them. You may
need to reboot, and then try to delete the temp files. Otherwise, some of them may be in use,
and you won’t be able to delete them.

No comments: