Chris,
This should help. It's a hack of one of the scripts at
http://www.beardsworth.co.uk/lightroom/scripts-for-bridge/In your code, you seem to be pointing to the thumbnail, then trying to parse it directly. In mine I show how I point to the thumb, then pull out its file name, then replace it.
John
f2xCommand .onSelect = function(m)
{
var getFolderChildren = true ;
var filesOnly = true ;
var thumbs = app.document.selections;
for ( var i = 0; i < thumbs.length; i++ )
{ thumb = thumbs[i];
md = thumb.synchronousMetadata;
md.namespace ="http://ns.adobe.com/photoshop/1.0/";
var fileArray = thumb.name.split(".");
str = fileArray[0]
strNew = str.replace("_"," ")
md.Title =strNew ;
}
Window.alert ("Done " + i + " records");
};