Re: .tmp files

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Jim Carlock (anonymous_at_127.0.0.1)
Date: 05/13/04


Date: Thu, 13 May 2004 13:22:23 -0400

The platform SDK indicates the following:

"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.

Windows Me/98/95: 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.

-- 
Jim Carlock
http://www.microcosmotalk.com/
Post replies to the newsgroup.
"J French" wrote:
On Thu, 13 May 2004 04:02:32 -0400, "Jim Carlock"
<anonymous@127.0.0.1> wrote:
<snip>
>
>I do what Randy does as well, but for some reason I tend to
>set TMP to C:\Tmp and TEMP to C:\Temp.
>
>I figured there are two variables for different reasons, although
>I'm not sure what those reasons are. They both are used by
>FrontPage and Amaya and Visual Basic.
I think that historically it was 'TMP'
- and they changed it to 'TEMP' later
It would be interesting to see what GetTempPath comes up with


Relevant Pages

  • Re: Difference between TEMP and TMP variables?
    ... The path specified by the TEMP environment variable, if TMP is not defined or if TMP specifies a directory that does not exist. ... Windows NT/2000/XP: The GetTempPath function does not verify that the directory specified by the TMP or TEMP environment variables exists. ...
    (microsoft.public.windowsxp.general)
  • Re: Temp folder question
    ... The path specified by the TMP environment variable. ... The GetTempPath function does not verify that the directory ... specified by the TMP or TEMP environment variables exists. ...
    (comp.lang.pascal.delphi.misc)
  • Re: Check the temp enviroment variable
    ... I have see my TEMP and TMP location point to C:/TEMP. ... "Susan Ramlet" wrote: ... It's identified by TEMP or TMP in the environment variables ...
    (microsoft.public.office.misc)
  • "Not enough space on temporary disk"
    ... increasing the maxlocksperfile registry setting, ... tmp and temp environment variables to an empty drive with 12Gb free. ... only one thing I can't figure out how to do, and that is change the ASPNET ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: TEMP vs TMP
    ... >I've heard that two environment variables, TEMP and TMP, should be set ... On an older machine of mine, my autoexec.bat sets TEMP ... >to a subdirectory of a RAM disk, and TMP is not set. ... and it had its origin with Unix (Unix uses TMP ...
    (comp.os.msdos.misc)