>LPARAMETERS lpcdir >IF VARTYPE(m.lpcdir)#"C" OR EMPTY(lpcdir) THEN > RETURN [] >ENDIF >DECLARE integer GetShortPathName IN WIN32API AS API_GetShortPathName String,String@,integer >LOCAL lcLongPath, lcShortPath, lnReturn >m.lnReturn = 0 >lcShortPath = SPACE(127)+CHR(0) >m.lcLongPath = ALLTRIM(m.lpcDir) + CHR(0) >m.lnReturn = API_GetShortPathName(lcLongPath,@lcShortPath,128) >IF m.lnReturn >0 THEN > m.lcShortPath = ALLTRIM(m.lcShortPath) > IF LEN(m.lcShortPath)>0 THEN > m.lpcDir = LEFT(m.lcShortPath, LEN(m.lcShortPath)-1) > ENDIF >ENDIF >RETURN lpcdir > >Have you tried to use the Windows Script Host to get the short path name?
oFSO = CREATEOBJECT("Scripting.FileSystemObject") * lcfile is the file of interest oFile = oFSO.GetFile(lcfile) ? oFile.ShortPath