Re: Again: Temp user directory

From: Jamie (jamie_5_not_valid_after_5_Please_at_charter.net)
Date: 09/30/04


Date: Thu, 30 Sep 2004 12:48:13 -0700

Laura:
   GetFullPathName! :))

L D Blake wrote:

> On Thu, 30 Sep 2004 10:34:18 +0200, "Tom de Neef" <tdeneef@qolor.nl> wrote:
>
>
>>Thanks to everyone in guiding me to the GetTempPath function in the windows
>>unit.
>>It does return the path of the user's temp dir and for my app it works fine.
>>
>>There remains an esthetic issue: its result is in the truncated format (eg
>>"C:\DOCUME~1\TOMDEN~1\LOCALS~1\Temp\").
>>A bit awkward to use in explanation to a user.
>>Would there be a way of getting the unabridged path name ?
>
>
> I do this by using the directory search tool, FindFirst...
>
> i.e. Findfirst(TempPath ...
>
> The long name is in the returned TSearchRec.
>
> In fact this is such a common sequence of events it's worth your while to make
> it into a function that returns the actual string and stuffing it into a unit
> personal unit someplace.
>
>
>
>>And more generally: where do I start searching for the answer if I can not
>>get it from you? I find Help not very helpful in this respect.
>
>
> [Evil Grin]
> Laura's 4 rules for user extacy....
>
> 1) RTFS ... Read the F---ing screen.
> 2) RTFH ... Read the F---ing help files.
> 3) RTFM ... Read the F---ing manuals.
> 4) THEN you can ask for help.
>
> My point being that almost always the questions asked here are answered by the
> documentation for Delphi or the WinAPI. In fact, most often what happens when
> I decide to answer someone's question is... yep... I end up doing the sequence
> above.
>
> -----
> Laura
>
> (http://www.start.ca/users/ldblake)



Relevant Pages

  • Again: Temp user directory
    ... Thanks to everyone in guiding me to the GetTempPath function in the windows ... It does return the path of the user's temp dir and for my app it works fine. ...
    (comp.lang.pascal.delphi.misc)
  • Re: Again: Temp user directory
    ... >>Thanks to everyone in guiding me to the GetTempPath function in the windows ... >>It does return the path of the user's temp dir and for my app it works fine. ... FindFirst is still the fastest way to convert short to long filenames. ...
    (comp.lang.pascal.delphi.misc)
  • Re: Asking Advice
    ... GetTempPath() looks for TMP first, ... create the folder if doesn't already exist. ... GetTempPath Function ...
    (microsoft.public.vb.general.discussion)