Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Difference between TEMP and TMP variables?

1 view
Skip to first unread message

overbored

unread,
Oct 11, 2004, 5:39:24 PM10/11/04
to
What's the difference between the environment variables TEMP and TMP? The
prerequisite Google search turned up nothing. I don't think they're
guaranteed to be the same. Is either one of them bad practice/obsolete?
Thanks in advance.

David H. Lipman

unread,
Oct 11, 2004, 5:47:41 PM10/11/04
to
99% of the time they point to the same location. They are legacy environmental variables
form DOS days when they may have pointed to different locations because they were needed for
different applications.

Dave


"overbored" <overb...@SPAMoverbored.net> wrote in message
news:Xns957F951939037...@207.46.248.16...

Andrew E.

unread,
Oct 11, 2004, 6:37:05 PM10/11/04
to
You'll find them in system properties,users.To see what is stored in it,go
to run,type:%Temp% Then in new window,edit,select all,delete all,close
out,empty recycle-bin.Thier all temporary installation files,none are used
anymore but to take up space.

h...@40th.com

unread,
Oct 11, 2004, 9:54:25 PM10/11/04
to
o- [Mon, 11 Oct 2004 14:39:24 -0700]:

>What's the difference between the environment variables TEMP and TMP? The

TMP -> developer tools temporary files
TEMP -> user apps temporary files

Usually, way back when, dev tools needed lots of temp
space while user apps not much. Today, it's probably
reversed, and yeah, these may as well point to the same
place. What's that got to do with having two? I'm
sure TMP came first, but that was too 'oddly' spelt for
regular users, so out came TEMP, many years after TMP.
TMP had to stay around. TMP is nice because TMP\0 fits
in an even number of bytes: a nice-sized, 4-byte chunk.

--
40th Floor - Software @ http://40th.com/
iPlay : the ultimate audio player for iPAQs
mp3, ogg, mp4, m4a, aac, wav, play & record
parametric eq, xfeed, reverb - all on a ppc

David Candy

unread,
Oct 11, 2004, 10:06:29 PM10/11/04
to
Temp is the Dos variable and Tmp is the Windows variable. Windows uses Tmp or if not set will look for Temp and use that.

But as most programmers don't have a clue about the difference either, programs often use Temp (they should be using neither as programs are supposed to ask windows where to write their temp files to and windows replies with the temporary directory to use).

--
----------------------------------------------------------
http://www.uscricket.com


"overbored" <overb...@SPAMoverbored.net> wrote in message news:Xns957F951939037...@207.46.248.16...

David Candy

unread,
Oct 12, 2004, 10:40:32 AM10/12/04
to
Remarks
Windows 95/98/Me: The GetTempPath function gets the temporary file path as follows:

1.. The path specified by the TMP environment variable.
2.. The path specified by the TEMP environment variable, if TMP is not defined or if TMP specifies a directory that does not exist.
3.. The current directory, if both TMP and TEMP are not defined or specify nonexistent directories.
Windows NT/2000/XP: The GetTempPath function does not verify that the directory specified by the TMP or TEMP environment variables exists. The function gets the temporary file path as follows:

1.. The path specified by the TMP environment variable.
2.. The path specified by the TEMP environment variable, if TMP is not defined.
3.. The Windows directory, if both TMP and TEMP are not defined.

--
----------------------------------------------------------
http://www.uscricket.com
"Alex Nichol" <alexn....@ntlworld.delete.com> wrote in message news:bmpnm05h36lg5ehrv...@4ax.com...

> TEMP is the usual one, but there are still some ancient programs around
> that use TMP, so it is usual to set both (to the same folder) just in
> case. They then behave identically
>
>
> --
> Alex Nichol MS MVP (Windows Technologies)
> Bournemouth, U.K. Al...@mvps.D8E8L.org (remove the D8 bit)

0 new messages