I have this case and I find the size of any file. If I don't know how many disks has my computer(for example C:,D:,Z:...or "panos:" or "name:"), how can I find this? How can I find the number of disks in a computer with python?
Are there any libraries on this topic? Also i want to run code in any operating system.
Please help.
import os
from os.path import join, getsize
for root, dirs, files in os.walk("C:"):
print(root, end=".py")
print(sum([getsize(join(root, name)) for name in files]), end="")
print("bytes in", len(files), "non-directory files")