Skip to main content
hannaa72427642
Participant
May 15, 2024
Question

Find and Replace in all of metadata

  • May 15, 2024
  • 3 replies
  • 492 views

Hi! Is there a script to find and replace a word in all of the fields of the metadata at the same time?

This topic has been closed for replies.

3 replies

Legend
May 15, 2024

No, and its not even possible. Adobe's XMP library will not write to or display many fields. Even EXIFTool will not read/write to everything although it will come much closer. You would need a SPECIFIC list of what you want changed.

I would recommend the post examples for EXIFTool.

I have a script which helps integrate EXIFTool and Bridge, and may make this a bit easier if you are not familiar with the command line.

https://www.dropbox.com/sh/mg817g9a9ymbasi/AADTmXUVxmFfM58bcyYE7yiwa?dl=0

Look in Developmental folder.

Stephen Marsh
Community Expert
Community Expert
May 15, 2024

Here it is for ExifTool:

 

exiftool -api 'Filter=s/Blue/Yellow/g' -TagsFromFile @ -IPTC:Caption-Abstract -IPTC:By-line -IPTC:ObjectName -IPTC:Keywords -XMP-dc:Creator -XMP-dc:Title -XMP-dc:Description -XMP-dc:Subject -IFD0:ImageDescription -IFD0:Artist 'Path to File or Dir'

 

Changing case-sensitive Blue to Yellow - formatted for the Mac with single-straight quotes (Windows would use double-straight quotes).

 

Before:

 

After:

 

hannaa72427642
Participant
May 15, 2024

Thank you so much! This will save so much time!

Stephen Marsh
Community Expert
Community Expert
May 15, 2024
quote

Thank you so much! This will save so much time!


By @hannaa72427642

 

You're welcome, however, as I mentioned earlier, you need to be specific about which metadata fields!

 

As you can see in Adobe File Info, there are only 4 entries for Blue, however, I needed to perform the find/replace in 10 different entries to completely cover the 4 instances. Many entries are written to multiple fields, if you miss some then you may get different/inconsistent results in different software.

Stephen Marsh
Community Expert
Community Expert
May 15, 2024

Not that I'm aware of. All fields? You need to be more specific.

 

You can try this one:

 

https://github.com/Paul-Riggott/PS-Scripts/blob/master/Find%20In%20Field.jsx

hannaa72427642
Participant
May 15, 2024

Thanks for your response! In know there is Paul-Riggotts Find and Replace but with that script you can only select a singel field. I want to do it in all fields (creator, description, keywords and so on) simultaneously.

Stephen Marsh
Community Expert
Community Expert
May 15, 2024

That has to be programmed for, explicitly targeting each metadata entry. Some will be simple strings, others like keywords will be arrays/lists.

 

This isn't trivial, even with ExifTool which is simpler than scripting Bridge.