Getting an overview if all available driveletters on NT
Fredrik Lundh
effbot at telia.com
Tue Apr 11 10:30:18 EDT 2000
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 all
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