1

How do you get all partitions and their info (total space, free space etc.) with Python on Windows? Thi example shows how to get free space, but you must know partitions/folders... I would like to get info for all partitions (maybe except CD-ROMs).

1
  • Maybe the answer to this question can help you? Commented Jul 13, 2011 at 7:43

1 Answer 1

1

Check out the WMI module. There are many recipes in the WMI cookbook, including

  • Find Drive Types
  • Show the percentage free space for each fixed disk
  • Show disk partitions
Sign up to request clarification or add additional context in comments.

2 Comments

Thanks, WMI looks pretty useful library
I am still in process of doing it by the way, does python WMI module has the ability to create partition?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.