🖌

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)

For Photographers.

Engineering Prompt:

**Role:** Python GUI Developer (PyQt6 Specialist)
**Task:** Create "EXIF Renamer" Desktop App

**Objective:** A desktop utility to batch rename photos based on their internal metadata (Date Taken).

**Tech Stack:**
* Language: Python 3.10+
* GUI Library: PyQt6 (Cross-platform)
* Metadata: Pillow, piexif
* Packaging: PyInstaller

**Functional Requirements:**
1.  **UI Layout (PyQt6):**
    *   **Folder:** Source Folder Selection.
    *   **Pattern:** Input field for renaming pattern (e.g., `{year}-{month}-{day}_{seq}`).
    *   **Table:** `QTableWidget` showing "Current Name" vs "New Name" preview.
    *   **Actions:** "Scan" to preview, "Apply" to rename.

2.  **Core Logic:**
    *   Safely extract `DateTimeOriginal`.
    *   Handle duplicates by adding incremental suffix (`_1`, `_2`).
    *   **Threading:** fast scanning of thousands of files.

3.  **Deliverables:**
    *   `main.py`: Complete source code.
    *   `requirements.txt`: Dependencies.
    *   **Build Instructions:**
        *   Windows: `pyinstaller --onefile --noconsole main.py`
        *   macOS: `pyinstaller --windowed --noconsole main.py`

🧠 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.