Page 1 of 1

Getting EXIF field "OriginalRawFileName"?

Posted: Tue Oct 01, 2019 12:16 pm
by Scriptor
Hi!
I need to be able to access the Raw Filename (as portrayed in Adobe Bridge) via javascript - how does one do this in the best way?
Normally whenever I need access to any field within the EXIF/IPTC I use "activeDocument.info.title" or similar, but testing this with "activeDocument.info.OriginalRawFileName" - I don't seem to get any results.

I have tried multiple files, all of which has a "Raw Filename" when looking at them through Adobe Bridge.

I've also tried "activeDocument.exif.title", "exif.Image.OriginalRawFileName" and countless variations, to no avail...
So - how do I solve this one?

Thank you in advance!

Re: Getting EXIF field "OriginalRawFileName"?

Posted: Wed Oct 02, 2019 2:39 pm
by Kukurykus
Where can we see that Raw Filename displayed in Bridge and is there any difference between current name and original?

Re: Getting EXIF field "OriginalRawFileName"?

Posted: Thu Oct 03, 2019 5:11 am
by Scriptor
Hey!
Adobe Bridge > Metadata > Camera RAW > RAW Filename

Yes, there's a difference in the original name and the current name:/

Re: Getting EXIF field "OriginalRawFileName"?

Posted: Thu Oct 03, 2019 11:19 am
by Stephen_A_Marsh
Full credit to SuperMerlin for providing 99% of the script, I just changed over the namespace and property:

Code: Select all

#target photoshop;  

//estk.aenhancers.com/10%20-%20Scripting%20Access%20to%20XMP%20Metadata/accessing-the-xmp-scripting-api.html
//forums.adobe.com/message/10315559#10315559
//Help with script to read specific XMP metadata in an image - Credit to SuperMerlin

if(documents.length){  
if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');  
var xmp = new XMPMeta(activeDocument.xmpMetadata.rawData);   
var RFN = xmp.getProperty(XMPConst.NS_CAMERA_RAW,"RawFileName");  
/////////////////// Do with as you wish  
alert(RFN);  
//////////////  
}

Re: Getting EXIF field "OriginalRawFileName"?

Posted: Fri Oct 04, 2019 7:10 am
by Scriptor
Hey! The original Filename is displayed in "Adobe Bridge" > "Metadata field" > "Camera Raw" > "Raw Filename"

This is the solution I went with if anyone's curious;

Code: Select all

if(documents.length){  
	if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');  
	var xmp = new XMPMeta(activeDocument.xmpMetadata.rawData);   
	var RAWname = xmp.getProperty(XMPConst.NS_CAMERA_RAW,"RawFileName");  
}
Have a nice weekend!

Re: Getting EXIF field "OriginalRawFileName"?

Posted: Fri Oct 04, 2019 11:44 pm
by Stephen_A_Marsh
The GUI can often be misleading, much better to use File Info > Raw Data

Re: Getting EXIF field "OriginalRawFileName"?

Posted: Sun Oct 06, 2019 6:56 am
by Kukurykus
Can you be more specific and tell me where exactly in Bridge is: Metadata (field), since I can't find it anywhere...

Re: Getting EXIF field "OriginalRawFileName"?

Posted: Tue Oct 08, 2019 1:03 pm
by Scriptor
Of course - credit to all of you; SuperMerlin, Stephen_A_Marsh and Kukurykus!

I can't find the field when trying to access it through Edit > Preferences > Metadata > Camera Raw. That's wierd.
However - it's visible here, if it helps;
Image

Have a nice day!

Re: Getting EXIF field "OriginalRawFileName"?

Posted: Thu Oct 10, 2019 2:09 pm
by Kukurykus
Ah, right, for no raw files there is no that raw filename avialable. I tried on jpg originally. On raw it's displayed.

Re: Getting EXIF field "OriginalRawFileName"?

Posted: Tue Oct 15, 2019 4:51 am
by Scriptor
Well that depends - if it's a .jpg that's exported from RAW it's present. But I don't really know all the rules about how it works yet - It seems to work for what I have in mind however! :)