Finding the size of the directory in Python
Warning
This post is more than a year old. Information may be outdated.
Examples
Reference
C:\Users\anacl\OneDrive\Documents (Folder): 3.13GB (3,366,343,239 Bytes)C:\Users\anacl\OneDrive\Pictures (Folder): 83.4MB (87,468,781 Bytes)C:\Users\anacl\OneDrive\Pictures\screenshot.png(File): 139KB (143,262 Bytes)
Default
Each element in the returned list is the value of [B, KB, MB, GB, ...] of the file size.
Full Readable Output
Short Readable Output
Backlinks1
221119Comments