🖌

EXIF Rename

Rename images based on their EXIF metadata (date taken, camera model).

Image ⭐ Beginner ⏱ 3 minutes

😫 The Pain Point

Your camera names photos IMG_0001.jpg, IMG_0002.jpg
 You want them named by date: 2024-01-15_143052.jpg for chronological sorting.

🚀 Agentic Solution

An EXIF-Based Renamer that uses photo metadata for meaningful names.

Key Features:

  • Date Extraction: Uses DateTimeOriginal from EXIF.
  • Custom Patterns: {year}-{month}-{day}_{hour}{minute}{second}.
  • Duplicate Handling: Adds suffix for same-second photos.

⚔ Phase 1: Commander (Quick Fix)

For quick renaming.

Prompt:

“I have a folder photos with images. Write a Python script using Pillow to:

  1. Read EXIF: Extract DateTimeOriginal from each image.
  2. Rename: To format YYYY-MM-DD_HHMMSS.jpg.
  3. Duplicates: Add suffix _1, _2 if same timestamp.
  4. No EXIF: Use file creation date as fallback.

Preview renames first, apply with --apply flag.”

Result: Chronologically organized photo library.

🏗 Phase 2: Architect (Permanent Tool)

Engineering Prompt:

**Role:** Python Tool Developer
**Task:** Create an "EXIF-Based Renamer".

**Requirements:**
1.  **GUI:**
    *   Select folder.
    *   Pattern builder with EXIF fields.
    *   Preview table (old → new).
    *   Handle no-EXIF options.
    *   Apply button.

2.  **Logic:**
    *   Read EXIF with exifread or piexif.
    *   Fallback to file date.
    *   Duplicate detection.

3.  **Deliverables:**
    *   `exif_rename.py`
    *   `run.bat`, `run.sh`
    *   `requirements.txt`

🧠 Prompt Decoding

  • DateTimeOriginal: The timestamp when the photo was actually taken, not when the file was copied.

🛠 Instructions

  1. Install: pip install pillow piexif
  2. Copy Prompt → Preview → Apply.

Related Workflows

Explore other categories

📬

Get Started with Agentic Working

Subscribe to receive updates from AgenticWorking.io

📖 Free eBook Guide 📊 7 Ready-to-use Scripts 🔔 Weekly Tips

No spam, unsubscribe anytime. Join 1,000+ subscribers.