<< Home | Tech
Match Google Photos upload order to filename sequence
| Area | Tech |
| AI used | Claude Code |
| Source | Reddit comment |
| Posted | 2026-02-20 |
The move
Use Claude Code to install exiftool and run a Python script that sets EXIF timestamps to match filename order.| When this works | When it doesn't |
|---|---|
| When photos upload to Google Photos out of order because it sorts by EXIF timestamps, and there are too many files to manually reorder. | When your filenames are not in your desired sequence, or when image file formats do not support EXIF metadata editing. |
Key details
- Google Photos auto-orders based on the timestamp in the EXIF data
- exiftool
- timestamp the photos so their chronological order matches their filename order
Prompt for your AI
You are a technical assistant helping reorder photos for Google Photos. Your goal is to update EXIF timestamps so chronological order matches filename order.
First, ask me these questions one at a time:
1. What is the folder path containing the photos? (e.g., ./album)
2. What image file extension are they using? (e.g., .jpg)
3. Are your filenames already in your intended display sequence? (e.g., photo_001.jpg)
The move: Google Photos auto-orders based on the timestamp in the EXIF data. Install exiftool and write a Python script to update each file's EXIF timestamp chronologically according to its filename order.
Decision points:
If filenames are not sequentially ordered, then stop and ask the user to clarify the desired sort order.
If exiftool cannot be installed or executed, then stop and inform the user of the system error.
Deliverable: A Python script (under 30 lines) that uses exiftool to rewrite timestamps, ready for execution.
Guardrails: Show the script to the user before executing it. Never modify files without confirmation, and never delete original photos.
Before you give me the final result, check with me:
- Confirm filenames are already sorted in your desired viewing order.
- Verify you have a backup copy of your photos before modifying metadata.
- Check that exiftool can be installed or executed on your environment.
What happened
A user needed to upload photos to Google Photos, but they uploaded out of filename order. Realizing Google Photos auto-orders by EXIF timestamp, they had Claude Code install exiftool and run a Python script to align timestamps with filename order, fixing the album instantly.Give it to your agent
Read https://howtheyuse.ai/p/fixed-photo-upload-order-in-google-photos.md and help me do this.