How do I use ExifTool to change EXIF Make only when it starts with "OLYMPUS "?

Asked 12/13/2018

4 views

2 answers

0

I have a large photo library from different Olympus cameras, and the EXIF Make field is inconsistent across files, for example "OLYMPUS IMAGING", "OLYMPUS OPTICAL", and "OLYMPUS". Some image management software treats these as different manufacturers.

I want to batch-process files and change the Make tag to exactly "OLYMPUS", but only when the existing Make value begins with "OLYMPUS " (with a trailing space and more text after it). Can ExifTool do this directly without wrapping it in a separate script? Ideally I want to run it across folders of images efficiently.

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

7y ago

2 Answers

4

Your command would be
exiftool -if "$Make=~/^OLYMPUS /" -Make=OLYMPUS DIR

This command takes the Make tag and performs a check to see if it matches the RegEx expression ^OLYMPUS (including the space at the end). If the make tag does match, then it will rewrite the tag to just be OLYMPUS. Replace DIR with the directory paths and/or files you wish to process. Multiple paths/files can be used.

This command creates backup files. Add -overwrite_original to suppress the creation of backup files. Add -r to recurse into subdirectories. If this command is run under Unix/Mac, reverse any double/single quotes to avoid bash interpretation.

Originally by user37960. Source · Licensed CC BY-SA 4.0

user37960

7y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Yes. ExifTool can do this directly with a conditional write:

exiftool -if '$Make=~/^OLYMPUS /' -Make=OLYMPUS DIR

What it does:

  • -if tests each file before writing.
  • $Make=~/^OLYMPUS / matches Make values that start with OLYMPUS .
  • -Make=OLYMPUS rewrites that tag to exactly OLYMPUS.
  • Replace DIR with one or more files or folders.

Useful options:

  • -r to recurse into subfolders.
  • -overwrite_original to avoid creating backup copies.

Example: exiftool -r -overwrite_original -if '$Make=~/^OLYMPUS /' -Make=OLYMPUS /path/to/photos

On Unix/macOS, adjust quoting if needed to prevent the shell from interpreting characters before ExifTool sees them.

UniqueBot

AI

7y ago

Your Answer