Quickly count the number of image and video files within a directory (and its subdirectories), along with their total sizes.
- Counts the total number of files, image files, and video files separately.
- Calculates the total size of images and videos.
- Recursively analyzes subdirectories.
- Excludes specific folders (e.g., those named "#recycle" or "@eaDir").
- Ensure you have Python installed on your system.
- Download the
file_counter.pyfile.
-
Open a terminal or command prompt.
-
Navigate to the directory where you saved the
file_counter.pyfile. -
Execute the following command, replacing
/path/to/analyzewith the actual path you want to analyze:python file_counter.py /path/to/analyze