using vfp 8 getenv("TEMP") returns a path in dos format.
ie. C:\DOCUME~1\DAVEBA~1.MAI\LOCALS~1\Temp
how can I convert this path to a true windows path

TIA Dave

Re: Path Names by Man-wai

Man-wai
Thu Jun 28 07:33:04 CDT 2007

> using vfp 8 getenv("TEMP") returns a path in dos format.
> ie. C:\DOCUME~1\DAVEBA~1.MAI\LOCALS~1\Temp
> how can I convert this path to a true windows path

That path is usable. Must you see the long name?

--
@~@ Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04) Linux 2.6.21.5
^ ^ 20:32:01 up 10 days 10:04 0 users load average: 0.06 0.05 0.02
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

Re: Path Names by Roger

Roger
Thu Jun 28 08:19:15 CDT 2007


"dave" <dave@somewhere.com> wrote:

> using vfp 8 getenv("TEMP") returns a path in dos format.
> ie. C:\DOCUME~1\DAVEBA~1.MAI\LOCALS~1\Temp
> how can I convert this path to a true windows path

Declare Integer GetLongPathName in Win32API ;
String, String @, Integer

lcBuffer = Replicate(Chr(0),256)
lcPath = GetEnv("TEMP")
GetLongPathName(lcPath, @lcBuffer, 256)
? Chrtran(lcBuffer,Chr(0), '')

-Roger



Re: Path Names by dave

dave
Thu Jun 28 09:25:21 CDT 2007

Thank you that's done the trick

"Roger Ansell" <notmy@realemailaddress.net> wrote in message
news:%23oelpZYuHHA.4476@TK2MSFTNGP03.phx.gbl...
>
> "dave" <dave@somewhere.com> wrote:
>
>> using vfp 8 getenv("TEMP") returns a path in dos format.
>> ie. C:\DOCUME~1\DAVEBA~1.MAI\LOCALS~1\Temp
>> how can I convert this path to a true windows path
>
> Declare Integer GetLongPathName in Win32API ;
> String, String @, Integer
>
> lcBuffer = Replicate(Chr(0),256)
> lcPath = GetEnv("TEMP")
> GetLongPathName(lcPath, @lcBuffer, 256)
> ? Chrtran(lcBuffer,Chr(0), '')
>
> -Roger
>



Re: Path Names by Man-wai

Man-wai
Fri Jun 29 06:10:15 CDT 2007

Thank you, your honour.

--
@~@ Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04) Linux 2.6.21.5
^ ^ 19:09:01 up 11 days 8:41 0 users load average: 0.00 0.00 0.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk