On my computer, the environment variables %TMP% and %TEMP% both point to the same location.
Are those for backward compatibility issues only, or is there a real difference?
The TEMP/TMP environment variables specify the location in which most programs place temporary files. By default, TEMP/TMP location is in the Windows partition. To speed up the access, you may set the TEMP/TMP variables to a ram disk.
Select the Advanced tab and click the [Environment Variables] button. The Environment Variables dialog box will be displayed. The paths for TMP and TEMP variables are listed in the User variables for (account) section. This is the default location assigned by the system to store temporary files.
Environment variables store data that is used by the operating system and other programs. For example, the WINDIR environment variable contains the location of the Windows installation directory. Programs can query the value of this variable to determine where Windows operating system files are located.
TMPDIR is the canonical environment variable in Unix and POSIX that should be used to specify a temporary directory for scratch space. Most Unix programs will honor this setting and use its value to denote the scratch area for temporary files instead of the common default of /tmp or /var/tmp.
It is for compatibility. It goes all the way back to DOS. Since there were no standards, some DOS (and Win 3.x) applications would look for the %TMP% environment variable and others would look for %TEMP%. You were best off if you set both of them in the AUTOEXEC.BAT file.
Windows NT set both of them automatically just to make sure all of the apps continued to work OK. %TEMP% is the standard now, but %TMP% lives on.
EDIT: Looks like Richard already mentioned the DOS aspect in a comment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With