extcount.py
recursively counts the total number and combined size of all files per extension within a directory and prints the results to console in separate frames.
- Python ≥3.7
- rich ≥10.1.0
- argparse ≥1.4.0
-
Download the script manually or clone the repository:
git clone https://github.com/kpg-anon/extcount
-
Navigate into the directory:
cd extcount
-
Install the dependencies:
pip install -r requirements.txt
By default, the current working directory will be used if none is provided. The optional -e
flag is used to specify one or multiple comma-separated extensions.
Example:
./extcount.py -e jpg,mp4 <folder path>
This will print out the total number of .jpg and .mp4 files in the specified folder path, as well as their combined size.
- add optional flag to specify depth
- add functionality to print extension counts by subfolder