Skip to main content
hannaa72427642
Participant
May 15, 2024 8:56 AM UTC
Question

Find and Replace in all of metadata

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 is closed to new replies. Start a new post to keep the conversation going.

7 replies

Legend
May 15, 2024 5:57 PM UTC

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.

Translate
Stephen Marsh
Community Expert
Community Expert
May 15, 2024 10:59 AM UTC

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:

 

Translate
hannaa72427642
Participant
May 15, 2024 11:31 AM UTC

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

Translate
Stephen Marsh
Community Expert
Community Expert
May 15, 2024 12:31 PM UTC
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.

Translate
Stephen Marsh
Community Expert
Community Expert
May 15, 2024 9:04 AM UTC

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

Translate
hannaa72427642
Participant
May 15, 2024 9:41 AM UTC

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.

Translate
Stephen Marsh
Community Expert
Community Expert
May 15, 2024 9:46 AM UTC

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.

 

Translate