Skip to main content
Participant
September 1, 2015
Question

copy filename to the Headline field in the IPTC

I'd like to copy filename to the Headline field in the IPTC, can anyone help me? I am using Bridge CC, but could do it in CS6. I am on a Mac. I need to do this to all images in a folder.

This topic is closed to new replies. Start a new post to keep the conversation going.

1 reply

Stephen Marsh
Community Expert
Community Expert
July 5, 2018

For historical record, this 3 year old unanswered question is now covered in another post:

Re: Copy Filename to IPTC Keywords

// https://forums.adobe.com/thread/656144  

// https://forums.adobe.com/message/9744916  

// https://forums.adobe.com/message/9745231  

#target bridge  

addNametoMeta = {};  

addNametoMeta.execute = function(){  

  var sels = app.document.selections;  

  for (var i = 0; i < sels.length; i++){  

var md = sels.synchronousMetadata;  

    md.namespace = "http://ns.adobe.com/photoshop/1.0/";  

    var Name = decodeURI(sels.name).replace(/\.[^\.]+$/g, ' '); //remove extension  

    md.Headline = md.Headline + Name;  

  }  

}  

if (BridgeTalk.appName == "bridge"){  

var menu = MenuElement.create( "command", "Filename to XMP and IPTC Headline", "at the end of Tools");  

  menu.onSelect = addNametoMeta.execute;  

} 

Translate