Is there a way to list all the available Windows’ drives?

import win32api

drives = win32api.GetLogicalDriveStrings()
drives = drives.split('\000')[:-1]
print drives

Adapted from:
http://www.faqts.com/knowledge_base/view.phtml/aid/4670

Leave a Comment