Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- def get_size(start_path = '.'):
- total_size = 0
- for dirpath, dirnames, filenames in os.walk(start_path):
- for f in filenames:
- fp = os.path.join(dirpath, f)
- total_size += os.path.getsize(fp)
- return total_size
- print(get_size()/1024/1024/1024)
Add Comment
Please, Sign In to add comment