Batch Rename Photos by Date Using EXIF Data on Linux

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

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.

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