-
Retrieve aeProjectLink from XMP data with Extendscript
Please help! I am trying to get this path stored as a string /Users/dracusin/Desktop/CollectorTestProject.aep
This is from the files XMP. I can see the line in bridge(vie FileInfo) but not in the AE metadata panel.
Here is my current function:
function GetMetaData(){
var item = app.project.activeItem;
var selectedFile = new File($.fileName);
var itemPath = selectedFile.parent.fsName;
var filePath = itemPath + "/" + item.name;
var fileRef = new File(filePath);if (fileRef instanceof File) {
if (ExternalObject.AdobeXMPScript == undefined) {
ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');
}
var xmpFile = new XMPFile(filePath, XMPConst.FILE_UNKNOWN, XMPConst.OPEN_FOR_READ);
var xmp = xmpFile.getXMP();
var newXML = xmp.getProperty(XMPConst.NS_CREATOR_ATOM, 'fullPath');
alert("Error: " + newXML);
xmpFile.closeFile();
}
}
This line returns the correct data for some reason:
var newXML = xmp.getProperty(XMPConst.NS_XMP, ‘CreateDate’).toString();
2019-11-27T19:49:44ZThis line does not:
var newXML = xmp.getProperty(XMPConst.NS_CREATOR_ATOM, ‘fullPath’);
/Users/dracusin/Desktop/TestProject.aepAny ideas?