Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

Find and Replace in all of metadata

Community Beginner ,
May 15, 2024 May 15, 2024

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

TOPICS
How to , Metadata , Scripting
354
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 15, 2024 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 15, 2024 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 15, 2024 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.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 15, 2024 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:

Layer 0.png

 

After:

Layer 1.png

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 15, 2024 May 15, 2024

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 15, 2024 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 15, 2024 May 15, 2024
LATEST

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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines