Link to home
Start Free TrialLog in
Avatar of GlenStreet
GlenStreet

asked on

tmp files appearing on Desktop

Has anyone come across a problem where .tmp files start appearing on the Desktop ?
Avatar of jj_mako
jj_mako

not me.
ASKER CERTIFIED SOLUTION
Avatar of joe_aqs
joe_aqs

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This can also happen if you're in the habit of opening Word documents which are on the desktop--Word always keeps a temporary file open while editing a document, and these can be left behind if it crashes.
You have to set the TEMP environment to a temporary workfile directory.

1. On your C: drive (or whatever drive you like).. make a Folder named TempWork. If the c:\windows\temp directory is present, you can use it if you like.

2. Add the following line into your c:\Autoexec.bat file. Assuming you want the c:\tempwork directory to be the place where you want temporary files to go.. it would look like this:

SET TEMP = c:\tempwork

If the c:\windows\temp directory exists and you want to use that instead.. the line would read..

SET TEMP = c:\windows\temp

3. Save the c:\Autoexec.Bat file and reboot. ALL TEMP files will now be placed in the directory you specified with SET TEMP.

Tip: A quick way to get all your sytem files Config.Sys, Autoexec.Bat, Win.Ini, System.Ini and a couple of others.. on the screen ready for editting is to use SysEdit.Exe. From the Start Menu.. click on Find.. Files or Folders.. and type in SYSEDIT into the find box. Click Find Now, and when SysEdit.EXE appears (it will be in the Windows\System directory) double click on it.
wsh2: You also need to set the TMP environment variable to the same folder or this won't work properly.
When temporary file directories first came around, some software developers used the TMP environment setting, and others used TEMP.. both served the same purpose. With time, TEMP pretty much became the standard, but there is no harm in setting the TMP as well.. to do so just ADD the following statement to the one above in the AutoExec.Bat file.. <smile>.

SET TMP=c:\MyTemporaryFolderName