[python-win32] how can we get list of all drives in Python

Jens B. Jorgensen jens.jorgensen at tallan.com
Tue Jan 20 15:05:59 EST 2004


from win32com.client import Dispatch
fso = Dispatch('scripting.filesystemobject')
for i in fso.Drives :
    print i

Hameed Khan wrote:

>hello all,
>    i was wondering how can i get list of all drives
>available on my windows platform. is there any
>function or something from  which can i build a list
>of all drives on my window platform.
>
>Thanks,
>Hameed khan
>
>__________________________________
>Do you Yahoo!?
>Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
>http://hotjobs.sweepstakes.yahoo.com/signingbonus
>
>_______________________________________________
>Python-win32 mailing list
>Python-win32 at python.org
>http://mail.python.org/mailman/listinfo/python-win32
>  
>

-- 
Jens B. Jorgensen
jens.jorgensen at tallan.com

"With a focused commitment to our clients and our people, we deliver value through customized technology solutions."

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3108 bytes
Desc: S/MIME Cryptographic Signature
Url : http://mail.python.org/pipermail/python-win32/attachments/20040120/1aa1fd3e/smime.bin


More information about the Python-win32 mailing list