>Hi,
>
>I like to know how do we change the long path name and filename obtain from the GETFILE() into the DOS short form name ? I had problem opening the file in folder with long name like
>
>From
>
> USE C:\My Installation\Report
>
>TO
>
> USE C:\Myinst~1\Report
>
There's a Win32 API call to do this:
DECLARE INTEGER GetShortPathName IN Win32API ;
STRING @cLongPath, ;
STRING @cShortPathBuff, ;
INTEGER nBuffSize
cBuf= space(511)
nBufSize = 511
nShortSize = GetShortPathName(cPathToConvert,@cBuf,@nBufSize)
IF nShortSize > 0
? LEFT(cBuf,nShortSize)
ELSE
ENDIF
>
>
>Any help or advise is very much appreciated. Thank you.