Funny how the same names crop up so often! I posted this to Geoff's enquiry at the
http://www.portfoliofaq.com/forum/.
John
#target bridge
//-----------------------------------------------------------------------
//This script copies selected thumbnails' filenames to the title field
//Also shows how to add menu items
//The AdobeLibrary scripts must be loaded
//--------------------------------------------------------------------
newMenu = MenuElement.create("menu", "Scripts", "after Tools", "MyMenu");
fCommand = MenuElement.create("command", "Set Title to same as Filename ", "at the end of MyMenu", "mySync");
fCommand.onSelect = function (m)
{
var getFolderChildren = true ;
var filesOnly = true ;
var thumbs = getBridgeThumbnails ( TYPES.PHOTOSHOP_OPENABLE, getFolderChildren, filesOnly) ;
for ( var i = 0; i < thumbs.length; i++ )
{ thumb = thumbs
;
md = thumb.synchronousMetadata;
md.namespace ="http://ns.adobe.com/photoshop/1.0/";
md.Title = thumb.name;
}
Window.alert ("Done " + i + " records");
};