hello, do somebody knows how to programm a convertert, that convert windowspath to dos-paths ("WINDO~1")?
Easy one BuBu-Boy:
LongPath db "C:\Folder\This is a long path.txt",0
ShortPath db MAX_PATH DUP(?)
invoke GetShortPathName,OFFSET LongPath,OFFSET ShortPath,MAX_PATH
Just a note of experience, ignore the return value of GetShortPathName. It always 'fails' on 98, even though the dest string has the correct value.
How to do the reverse?
The reverse: GetLongPathName... or, if you insist on supporting win95, FindFirstFile - have a look at the MSDN entry for GetShortPathName.