> Hi,
> Im looking for a way to show a file address in MS-Dos address format.
> eg : C:\program files\myFile.exe , shown as : C:\progra~1\myFile.exe
>
> I was knew how to do that, but then I forgot and I need it now.
>
> Thanks In Advanced
DECLARE INTEGER GetShortPathName IN kernel32;
STRING lpszLongPath,;
STRING @ lpszShortPath,;
INTEGER cchBuffer
cLongFileName = FULLPATH( "VFP9.exe" )
?m.clongfilename
cShortName = SPACE(1024)
?getshortpathName( m.clongfilename, @m.cshortname, len(m.cshortname) )
?m.cshortname
The other way around:
DECLARE INTEGER GetLongPathName IN kernel32;
STRING lpszShortPath,;
STRING @ lpszLongPath,;
INTEGER cchBuffer
cLongPath = space(1024)
?GetLongPathName( m.cShortName, @cLongPath, len( cLongPath))
?m.cLongPath
Boudewijn Lutge®ink
Universal Truth is never changing. most of what we conceive as a truth is only temporarily and thus questionable.