Project

General

Profile

Can I change the created-time and rename the file in one operation?

Added by Rowan Sylvester-Bradley over 10 years ago

Probably another beginner's question, but can I change the created-time of a batch of photos and rename the files in a single operation? When I try, using the command exiv2 -a-01:10:54 -r':basename:_x.jpg' rename *.jpg, it tells me that the commands/options are not compatible.

It would be helpful to do this, since otherwise if the processing of the files (I've got thousands of them) stops part way through for any reason, there will be no way of knowing which files have had their created-times changed.

And another question about file renaming - can I change filenames in a more sophisticated way - i.e. can I rename all files of the form DSC*.JPG to DSD*.JPG (where * is any string of characters)?

Thanks - Rowan


Replies (1)

RE: Can I change the created-time and rename the file in one operation? - Added by Andreas Huggel over 10 years ago

You need two separate operations to rename images and adjust their timestamps. If an operation fails for some reason, Exiv2 will output an error message with the name of the image, so you'll now where it stopped. Alternstively you could run it with verbose output (-v) and capture that in a logfile.

The built-in rename function is meant to rename the image based on the Exif timestamp. Use a generic rename-tool for the requirement in your example.

Andreas

    (1-1/1)