python - Is there a way to list all the available Windows' drives? - Stack Overflow

PHOTO EMBED

Fri Mar 17 2023 10:39:45 GMT+0000 (Coordinated Universal Time)

Saved by @yusufalao #python

import win32api

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

https://stackoverflow.com/questions/827371/is-there-a-way-to-list-all-the-available-windows-drives