Cannot add to existing metadata

  • 1
  • Problem
  • Updated 1 year 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

anonamouse

  • 28 Posts
  • 2 Reply Likes

Posted 1 year ago

  • 1
Photo of Alex Furer

Alex Furer

  • 152 Posts
  • 39 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

  • 74 Posts
  • 15 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.



// https://forums.adobe.com/thread/2094964
#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 =  "http://purl.org/dc/elements/1.1/";  
var Caption = md.description ? md.description[0] : "";  
md.description='';  
md.description = Caption + suffixName;  
}  
 app.document.chooseMenuItem('PurgeCache');  
};
(Edited)
Photo of Stephen Marsh

Stephen Marsh

  • 74 Posts
  • 15 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:

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

Win:
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).
(Edited)
Photo of Cristen Gillespie

Cristen Gillespie

  • 1372 Posts
  • 376 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.