11

I have nearly a million photos taken with a variety of cameras across a decade or so and have finally embarked on the massive task of organisation. To automate this somewhat, I'm looking for software (lightweight preferred) that renames each photo according to the date taken (not modified) and the camera model, information that can be obtained from the EXIF data of the file.

For instance,

IMG_9532.JPG taken with a Canon EOS 80D on the 29th of February 2016 would be labelled CANON EOS 80D 29/02/2016 or something similar.

The software should be available for Linux (Ubuntu preferred). CLI interface is fine.

1
  • 1
    I can't believe this question has only 177 views after 6 years. Commented May 7, 2022 at 4:14

2 Answers 2

9

The exiftool command line utility (from the package of the same name) reads and writes EXIF information. The “writing” can include renaming the file. There are examples in the manual under “Renaming examples”. You want something like (untested)

exiftool -d '%Y-%m-%d' -filename'<${model;}-${datetimeoriginal;}.%e' *.jpg

To process files in subdirectories as well:

find . -name '*.jpg' -exec exiftool '-filename<%d/${model;}-${datetimeoriginal;}.%e' {} +
1
  • 1
    Yay to that! If Gilles hadn't already recommended it, I'd do so now. I'm using exiftool quite often, wouldn't want to do without. So +1 from me, and take my comment as another recommendation of this great command-line tool!
    – Izzy
    Commented Dec 21, 2015 at 19:12
3

Before Gilles submitted this excellent answer, I was experimenting with pyRenamer, a GUI tool written in Python. It allows renaming of files en masse based on portions of their existing file names, as well as using their metadata (for photos and music).

It was straightforward to use for me. I managed to use the following file name pattern to rename my files:

{cameramaker} {cameramodel} {imageyear}.{imagemonth}.{imageday} {imagetime}:{imagesecond} {1} {rand}

However, this tool no longer appears to be under active maintenance, especially since the homepage appears to be unavailable. Furthermore, documentation on the available patterns is scarce. While you can obtain a list by hovering over the relevant field, the list displayed will probably exceed the height of most screens and hence cannot be viewed in its entirety.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.