Index / Snippets / Batch Rename Photos by Date Using EXIF D

Batch Rename Photos by Date Using EXIF Data on Linux

Use exiftool to rename thousands of photos to YYYYMMDD-HHMM format in seconds.

Answers
How do you batch rename photos by their EXIF date on Linux?
Topics
apple · cloud · linux
Full article on willem.com
https://willem.com/en/2020-08-31_free-from-the-icloud-escaping-apple-photos/

Summary

After exporting your photos from Apple Photos, you're left with meaningless filenames like IMG_4523.jpg. Here's how to batch rename them all by their actual creation date using EXIF metadata and a single terminal command.

Full text

With your photos freed from Apple Photos, the next step is renaming every file to something meaningful. The exiftool command on Linux (also available on macOS) reads the EXIF creation date embedded in each photo and renames the file accordingly.

The command: exiftool -d '%Y%m%d-%H%M%%-03.c.%%e' '-filename<CreateDate'

Using EXIF information to rename photos to include the date and time

This renames every photo to a YYYYMMDD-HHMM format — so IMG_4523.jpg becomes 20190614-1423.jpg. Run it on a powerful machine if you have thousands of photos; Willem ran his on a server to speed things up.

This snippet is from the complete guide to escaping Apple's photo ecosystem.

Machine formats of this page