Getting an overview if all available driveletters on NT

Ulf Engstrøm ulf.engstrom at
Wed Apr 12 07:45:36 CEST 2000

As the effbot told you the win32api is probably the one you wanna use, but
the function is GetLogicalDriveStrings() This won't gives you all the the
driveletters, but not their labels, there might be something like that
there, just never have had to use it. Someone else might now that part?
>>> win32api.GetLogicalDriveStrings()

> Pieter Claerhout <PClaerhout at CREO.BE> wrote:
> > is there a module in Python, which can list all available driveletters,
> together with
> > their label. I'm using Windows NT? I already thought of iterating over
> possible
> > driveletters, and see if the path exists or not, but I also want to
> separate the
> > network volumes from the other volumes. Any ideas?
> just guessing here (don't have win32api on this box),
> but this might do the trick:
>     type = win32api.GetDriveType("%s:\\" % drive)
> where drive is 'A' through 'Z'.
> </F>
> --

More information about the Python-list mailing list