The Win95 Temp folder explained




Could you explain the function of the Windows 95 Temp folder? I was surprised, when I checked its properties, to find that it's using up 40Mb of disk space. There are some folders inside it that are obviously associated with applications like Office 97, but these only take up a few kilobytes. The rest of the folder is composed of various things, such as setup icons for often obsolete applications, as well as numerous Notepad files. Some of these are empty, some seem to contain bits of old e-mails, and some contain masses of code, often with reference to "Root Directory".
Does it empty itself periodically, and do the contents serve any ongoing purpose? Is it possible to prune it manually?
- Rohan Parkes


You may remember from the days of DOS a line in your autoexec.bat file that read set temp=c:\dos. This created a pointer to a directory where any programs wanting to write temporary files could do so. Windows 95 introduces a second variable, tmp, with the same purpose. To see where these variables point, at the DOS command prompt type set. You should see something like this:
tmp=c:\windows\temp
temp=c:\dos
If the temp variable does not exist or points to a directory that you don't want it to, in your autoexec.bat file edit or insert a line that reads:
set temp=c:\windows\temp
Programs will write files in these directories from time to time. The InstallShield program used to install software such as Netscape writes temporary files to this tmp directory. Files can build up if a program is interrupted during execution before it can delete the files.
If you want to delete the contents of the temporary directories you should first close all open programs to be on the safe side. There are no guarantees that a program might not write a file to the temporary directory and want it later. But this would be badly designed software given that the directory is shared by many other programs. Also the default in DOS was to make c:\dos the temporary directory, making it a little tricky to distinguish between old temporary files and files that belong there. Usually by checking the date you can figure which files can be deleted. The temporary files are usually the most recent.
- Roy Chambers


Category: Win95
Issue: Jun 1997
Pages: 155-156

These Web pages are produced by Australian PC World © 1997 IDG Communications