Adobe Bridge 2018 script to "Prepend filename to the Description"
Hi,
I am trying to create an Adobe Bridge 2018 script to "Prepend filename to the Description".
#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(/\.[^\.]+$/, '');
md.Caption = md.Caption + Name;
}
}
if (BridgeTalk.appName == "bridge"){
var menu = MenuElement.create( "command", "Prepend Filename to description", "at the end of Tools");
menu.onSelect = addNametoMeta.execute;
}
Have tried: md.Description = md.Description + Name;
Would like: md.Description = md.Description + " " + Name;
Any suggestions out there ????
