win32api -- long vs short filenames

David Niergarth jdnier at execpc.com
Wed Aug 4 14:28:26 EDT 1999


I'm trying to expand a mangled DOS 8+3 name (from WinNT4.0) into the long
version of the name. There's a win32api function for doing the opposite, for
example,

>>> win32api.GetShortPathName(r'c:\long_path_name\long_file_name.txt')
'c:\\LONG_P~1\\LONG_F~1.TXT'

But I can't figure out how to expand a mangled name into the original long
name. Any ideas?

--David Niergarth







More information about the Python-list mailing list