# Example: create folders from 2005 to 2024 under ~/Photos
./create_photo_dirs.sh ~/Photos 2005 2024
Output structure:
~/Photos/
2005/
01_January/
02_February/
...
2006/
...
rename_photos.py
Renames photos in a folder to a consistent YYYY-MM-DD_HHMMSS_originalname.ext format. Uses EXIF DateTimeOriginal when available, falls back to file modification time.
# Preview changes without renaming
python rename_photos.py ~/Photos/unsorted --dry-run
# Rename for real
python rename_photos.py ~/Photos/unsorted
sort_photos_into_dirs.py
Moves (or copies) photos from a flat folder into a Year/Month directory tree automatically.
# Copy instead of move
python sort_photos_into_dirs.py ~/Downloads/OldPhotos ~/Photos --copy
Requirements
pip install Pillow
Pillow is used to read EXIF data for accurate photo dates. If not installed, all scripts fall back to file modification time.
Typical Workflow
Run create_photo_dirs.sh to build the folder structure.
Run rename_photos.py on your unsorted folder to standardize filenames.
Run sort_photos_into_dirs.py to move everything into the right Year/Month folder.