import ctypes import ctypes.wintypes if __name__ == '__main__': k32 = ctypes.windll.kernel32 vname = ctypes.create_unicode_buffer(ctypes.wintypes.MAX_PATH) vhandle = k32.FindFirstVolumeW(vname, ctypes.wintypes.MAX_PATH) while True: print(vname.value) if not k32.FindNextVolumeW(vhandle, vname, ctypes.wintypes.MAX_PATH): break