A small Python script that generates a .txt file of the sizes of your Dropbox folders. Perfect for checking the sizes of folders that you have selectively unsync-ed.
Updated for Dropbox Python SDK V2!!!!!!!
-
Python SDK Installation instructions here.
-
Dropbox Access Token. Still new to Dropbox development, so I'm not sure what the proper way of getting an access token is, but the way I did it was to:
- Visit Dropbox's Developer site and go to App Console.
- Create a Dropbox API app with "Files and Datastores", "No", "All file types" options.
- Get the app key, visit this website and it will generate an access token for you.
Input your access token into the script.
The script accepts 2 variables:
-
Denomination (non-negative integer). Input 0 to express size in bytes, 1 for KB, 2 for MB, 3 for GB, etc.
-
Levels (non-negative integer). Tells the script how far down the directory tree you want to look. E.g. if set to 1, the script will output the sizes of all your folders in the main Dropbox directory.
- Dropbox still thinks .pages documents are folders. I might or might not get around to fixing this.
- Make this script a full-fledged app, with browser redirection for OAuth authentication and stuff.
- Add support to run script in sub-folders.
- Add a switch to un-ignore files that appear above the set level.