Hi,
>>Never mind - GetLongPathName() API does the trick.
>>But why does SYS(2023) return the full filename in the dev environment and the DOS path name in the EXE (is it documented anywhere)?
>>
>>Regards,
>>Viv
>>
>You can also use the Windows Script Host to do this. See the series of articles that the late Ed Rauh and I did for VFUG a few years back. Of interest will be the third article in the series on the Scripting.FileSystemObject. It can get you and object reference to the file like this.
>oFSO = CREATEOBJECT('Scripting.FileSystemObject')
>lcFile = "VFP9.EXE"
>oFile = oFSO.GetFile(lcfile)
>? oFile.Path
Thanks - but I've a few problems with this: (a) AFAICS it doesn't work because the parameter to GetFile() requires a path in the first place, (b) we can't rely on Scripting being available and (c) it's not what I'm trying to do ;-)
What I needed was the full pathname to the VFP temp directory when SYS(2023) is called from the EXE. In the dev environment I get this; in the EXE SYS(2023) returns the DOS path so I'm currently doing GetLongFilePath(SYS(2023)...) which works OK. Just don't know why the difference between the environments..
Regards,
Viv