Getting an overview if all available driveletters on NT

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


Ok,

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
Pieter_Claerhout at creoscitex.com



-----Original Message-----
From: fredrik at pythonware.com [mailto:fredrik at pythonware.com]
Sent: Wednesday, April 12, 2000 11:58 AM
To: python-list at python.org
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
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()
> '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...

</F>


Sent via Deja.com http://www.deja.com/
Before you buy.
-- 
http://www.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list