Q: How to convert long Win95 paths to 8.3 dos paths?
Dennis Lee Bieber
wlfraed at ix.netcom.com
Fri May 7 01:17:08 EDT 1999
On Fri, 07 May 1999 03:17:07 +0200, Michael Scharf
<Michael.Scharf at kosmos.rhein-neckar.de> declaimed the following in
comp.lang.python:
> 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...
>
> This would convert
> C:\Program Files
> to
> C:\PROGRA~1
>
I doubt that there is one that doesn't require first scanning
the MS-DOS directory structure. I've not studied it in detail, but
believe the long names are physically stored in a separate directory
extension with pointers back to the MS-DOS 8.3 directory entry.
It isn't just a case of "long name X always compacts" to
"longna~1". Rather, any time a long name is created the OS compacts to a
~1 and sees if that name is already in use ON THAT FILE SYSTEM. The name
may compact differently on some one elses machine.
--
> ============================================================== <
> wlfraed at ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG <
> wulfraed at dm.net | Bestiaria Support Staff <
> ============================================================== <
> Bestiaria Home Page: http://www.beastie.dm.net/ <
> Home Page: http://www.dm.net/~wulfraed/ <
More information about the Python-list
mailing list