Drive space

Trent Mick trentm at
Tue Aug 13 04:26:00 CEST 2002

[Ken Seehof wrote]
> How do you get the total remaining drive space, given the drive letter, on
> Windows?

Parse the output of "dir" (using os.popen to call it) or learn how to
use the win32pdh module (part of the PyWin32 extensions, which are
included in your Python installation if you use ActivePython).

There are example uses of win32pdh here:

See MSDN for API details:


Trent Mick
TrentM at

More information about the Python-list mailing list