A+: Temp files

The default location for temporary files in Windows versions prior to Windows Vista/XP is the TEMP folder beneath the default Windows folder (\Windows or \WinNT). Windows Vista and XP use \Windows for system temporary files, and XP uses \Documents and Settings\Username\Local Settings\Temp for user-specific temporary files. Vista uses \Users\Username\AppData\Local\Temp for user-specific temporary files.
The location can be adjusted with a pair of SET statements.

Some applications use SET TEMP=location; others use SET TMP=location (replace location with the actual drive and folder path). Be sure to change both variables if you need to change the setting for temporary files.

Temporary File Settings in Windows Vista/XP/2000


Use the Advanced tab on the System properties sheet to set environmental variables such as SET TEMP and many others. Here’s how to make the change (you must be logged on as an administrator):

    Step 1. Create a folder called TEMP in the root folder of the drive you want to use for your temporary files. You can use Windows Explorer/My Computer/Computer or the MKDIR (MD) command.

    Step 2. Open the System properties sheet. You can right-click on My Computer and select Properties or open the System icon in Control Panel.

    Step 3. Click the Advanced tab.

    Step 4. Click Environmental Variables. A new window opens.

    Step 5. Click TEMP in the System variables window and click Edit.

    Step 6. The Edit System Variable window opens (see Figure 13-55). Clear the variable value (%SystemRoot%\TEMP) and enter the drive and folder you used in Step 1 (for example, E:\TEMP). Click OK.

    Step 7. Repeat steps 5–6, selecting TMP instead of TEMP.

    Step 8. Click OK in the Environment Variables window.

    Step 9. Click OK on the System properties sheet.

    Note: Use this same method to add, delete, or change other system variables. To change the location for individual users’ temporary files, change the settings in the User variables window (top window).

Comments