Changing the temporary directory
1 January 2000 by Snakefoot | Comment » | Trackback OffThe temporary directory is specified by two environment variables called TMP and TEMP. When an application or batch file have to create an temporary file, then they can use one of these variables to get the path of the temporary directory.
To move the TEMP directory to another folder/partition/HDD edit the file AUTOEXEC.BAT and insert/update these lines (Best to place them in the top of the file):
To move the TEMP directory to another folder/partition/HDD edit the file AUTOEXEC.BAT and insert/update these lines (Best to place them in the top of the file):
Note the temporary directory is a location where files often are created and deleted. Some times it can be useful to move the temporary directory to another location.REM *** Places all temporary files in the directory D:\TEMP ***
SET TEMP=D:\TEMP
SET TMP=D:\TEMP
- The partition holding the temporary directory is low on free space.
- File fragmentation introduced by the temporary directory is better placed on another partition.
- There exist another partition which is much faster.
More Info MS KB Q130075ECHO Clearing TEMP directory : %TEMP%
DELTREE /Y %TEMP%\*.* >NUL
Updated: 2 July 2007