How to convert long Win95 paths to 8.3 dos paths?

Mark Hammond MHammond at skippinet.com.au
Fri May 7 05:26:14 EDT 1999


The win32api module can tell you this using the FindFiles function:

>>> win32api.FindFiles("C:\\Program Files")[0][-1]
'PROGRA~1'

AFAIK there is no standard way in Python to get this...

Mark.

Michael Scharf wrote in message
<37323F13.21DEF314 at kosmos.rhein-neckar.de>...
>Hello,
>
>I am looking for a function, that can convert
>long NT or Win95 names to 8.3 dos names
>(the same name that 'dir /x' would show).
>I could not find anything relevant in the
>with dejanews nor on the python pages...







More information about the Python-list mailing list