I am calling the disk_usage() method on python's shutils for an optical drive on windows:

stats = shutil.disk_usage('F:')

This returns:
Total: 2976847872
Used: 2976847872
Free: 0

When I select the drive and ask for its properties, windows reports:
Used space: 2,981,625,856
Free space: 1,718,747,136
Capacity: 4,700,372,922

The disk has not been finalized and the drive is using the UDF file system.

It's like disk_usage() can't see the free space on the optical drive

I really want to find the total and free spaces on that drive

Edit: I also tried psutil.disk_usage('F:') and got the same result as shutil.disk_usage('F:')

0

There are 0 answers