Photo Organizer is a Python script designed to automatically organize your photo collection by their creation dates and store them in a logical structure. It reads the EXIF data of your images to determine the date each photo was taken and organizes the photos into folders based on this date. I use this script to better organize my photos I capture with several cameras.
- Extracts the creation date from the photo's EXIF data.
- Organizes photos into year/month/day folders based on their creation dates.
- Falls back to the file's creation date if EXIF data is not available.
- Logs all actions and errors for easy troubleshooting.
- Python 3.x
exifread
library for reading EXIF data from images.shutil
andos
libraries for file and directory operations.datetime
library for date and time operations.logging
library for logging errors and operations.
- Ensure Python 3.x is installed on your system.
- Clone the repository or download the script to your local machine.
- Install the required Python package:
pip install exifread
- Edit the
source_folder
anddestination_folder
variables in the script to your desired paths.
source_folder
: The directory where your unorganized photos are stored.destination_folder
: The directory where you want the organized photos to be placed.
- Run the script using Python:
python photo_organizer.py
- Logging: The script logs its operations and errors in
photo_organizer.log
. You can change the log file name and logging level at the beginning of the script.
- Ensure that the paths to the source and destination folders are correct and accessible.
- Check the
photo_organizer.log
file for detailed error messages if the script fails to organize some photos.