Answered
XMPConst.OPEN_FOR_UPDATE throwing error
This short test script used to work getting a files description in Bridge, but now it fails on the line tha has: XMPConst.OPEN_FOR_UPDATE. The error is XMP Exception: OpenFile retuned false. Anyone else having issues with this?
#target bridge
if (ExternalObject.AdobeXMPScript == undefined) {
ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');
}
var doc = app.document
var thumbs = doc.selections
for(var i=0;i<thumbs.length;i++){
var tSpec = thumbs[i].spec;
var testFile = new File(tSpec);
readTextFile (testFile)
};//end for thumbs loop
function readTextFile(file){
var xmpf = new XMPFile(File(file).fsName, XMPConst.UNKNOWN, XMPConst.OPEN_FOR_UPDATE );
var xmp = xmpf.getXMP();
var des = xmp.getProperty(XMPConst.NS_DC, "description").toString();
alert(des)
xmpf.closeFile( XMPConst.CLOSE_UPDATE_SAFELY );
}

