Getting an overview if all available driveletters on NT

Pieter Claerhout PClaerhout at CREO.BE
Wed Apr 12 06:27:51 EDT 2000


here's the complete story. I used win32api.GetLogicalDriveStrings() to get a list of
all available drives, and then I used win32file.GetDriveType(i) to find out the type
of the drives. This is what I found:

- 2 -> floppy
- 3 -> fixed hard drive or subst'd drive
- 4 -> mapped network drive
- 5 -> cd-rom drive

Kind regards,

Pieter_Claerhout at

-----Original Message-----
From: fredrik at [mailto:fredrik at]
Sent: Wednesday, April 12, 2000 11:58 AM
To: python-list at
Subject: Re: Getting an overview if all available driveletters on NT

Ulf Engstrom wrote:
> 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
> driveletters, but not their labels, there might be something like that
> there, just never have had to use it. Someone else might now that
> >>> win32api.GetLogicalDriveStrings()
> 'A:\\\000C:\\\000D:\\\000E:\\\000'

umm.  didn't the original poster ask for a way to
tell ordinary drives from network drives?  that's
exactly what GetDriveType does...


Sent via
Before you buy.

More information about the Python-list mailing list