How to convert the File Path!

Hello everyone.
Could sombody tell me a function about to convert a file path to "dos based file path"
ex: C:\Program Files\Bla\bla.exe to c:\Progra~1\Bla\bla.exe
I need to write the "dos based" path to a batch file.....I search a lot but without results. Manny thanks.
[281 byte] By [g_gili] at [2007-11-19 19:44:21]
# 1 Re: How to convert the File Path!
GetShortPathName()

Kuphryn
kuphryn at 2007-11-10 23:43:03 >
# 2 Re: How to convert the File Path!
Have you tried GetShortPathName()?
Mike Harnad at 2007-11-10 23:44:03 >
# 3 Re: How to convert the File Path!
Thanks. I didn't know that :blush: :D
g_gili at 2007-11-10 23:44:58 >
# 4 Re: How to convert the File Path!
also, you can check it using ur command prompt doing:

dir /x

will display the short (old dos-based style) file paths...
but getshortpathname() seems like it'd be the more efficient way.
80Degrees at 2007-11-10 23:46:05 >