Cannot add to existing metadata

  • 1
  • Problem
  • Updated 2 years ago
Multiple files with existing varying metadata. Need to add to description. Cannot append without losing existing data. 
Append Metadata > [template name] Applies the template metadata where no metadata value or property currently exists in the file.

Replace Metadata > [template name] Completely replaces any existing metadata in the file with the metadata in the template.

So how do I ADD to files without losing what is already there? 

Photo of anonamouse


  • 33 Posts
  • 3 Reply Likes

Posted 2 years ago

  • 1
Photo of Alex Furer

Alex Furer

  • 167 Posts
  • 44 Reply Likes
Have a look at Jeffrey Friedl's Metatdata Wrangler. It's unfortunately part of the export process, so maybe not exactly what you are looking for. But maybe you can find a way to use it to "just" change the metadata of your images, or talk to Jeffrey, he's very helpful.
Photo of Stephen Marsh

Stephen Marsh

  • 102 Posts
  • 19 Reply Likes
You will need to add a script to Bridge to append a suffix (or prefix) to an existing Description metadata entry.

Copy the 19 lines of code below and paste into the Adobe ExtendScript Toolkit program or into a plain text editor such as Notepad, TextEdit or similar and save with a .jsx filename extension (not .txt).

In Bridge, use Preferences > Startup Scripts and press the "Reveal My Startup Scripts" button and move the saved .jsx file into this folder. Quit and restart Bridge enabling the new script when asked.

You should now have a new entry under your Tools menu for "Add Suffix to Description". When invoked with multiple files selected in Bridge, you will be presented with a GUI text field to append the required text.

#target bridge;   
   if( BridgeTalk.appName == "bridge" ) {    
suffixDesc = new MenuElement("command", "Add Suffix to Description", "at the end of Tools");  
suffixDesc.onSelect = function () {   
var sels = app.document.selections;  
suffixName = Window.prompt("Please enter description suffix","","suffix Description");  
if (suffixName == null)  return;      
for(var a in sels){  
var thumb = sels[a];  
md = thumb.synchronousMetadata;  
md.namespace =  "";  
var Caption = md.description ? md.description[0] : "";  
md.description = Caption + suffixName;  
Photo of Stephen Marsh

Stephen Marsh

  • 102 Posts
  • 19 Reply Likes
You could also use the command line ExifTool program to do similar. To append the text "SMEG" the command line code would be:

exiftool -m '-description<$description SMEG' 'Path to file or folder'

exiftool -m "-description<$description SMEG" "Path to file or folder"

Of course, CLI code gets more complex than this, however this is the basic start point (ensure quote marks are straight and not curly and ensure that the path to the file or folder is valid).
Photo of Cristen Gillespie

Cristen Gillespie

  • 1705 Posts
  • 569 Reply Likes
That's so very nice of you to share. I haven't needed to append to a description for multiple files, but I can see the use of it. I was surprised to see that Bridge didn't allow it. Hopefully one of these days it will be a capable app living in the 21st century.