>Earlier we used to save files with more than 8+3 charecters for file name and extension. Now we can have long file names (enhanced file descreptions). If I give the long file name , I want the equilant short file name and vice versa.
>
>eg: when you type DIR command at DOS prompt, you get short and long file names.
>
>If I need to use any Windows APIs or DLLs, Pl give the names and functions to retrieve the fiel names.
>
Try:
LPARAMETER cPathToConvert
LOCAL cBuf, nBufSize, nShortSize
DECLARE INTEGER GetShortPathName IN Win32API ;
STRING @cLongPath, ;
STRING @cShortPathBuff, ;
INTEGER nBuffSize
cBuf= space(511)
nBufSize = 511
nShortSize = GetShortPathName(cPathToConvert,@cBuf,@nBufSize)
IF nShortSize > 0
RETURN LEFT(cBuf,nShortSize)
ELSE
RETURN ''
ENDIF