Getting EXIF field "OriginalRawFileName"?

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

User avatar
Scriptor
Posts: 29
Joined: Tue Oct 01, 2019 12:07 pm

Getting EXIF field "OriginalRawFileName"?

Post 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!

Professional AI Audio Generation within Adobe Premiere Pro - Download Free Plugin here

User avatar
Kukurykus
Posts: 528
Joined: Mon Jul 25, 2016 12:36 pm

Re: Getting EXIF field "OriginalRawFileName"?

Post by Kukurykus »

Where can we see that Raw Filename displayed in Bridge and is there any difference between current name and original?
User avatar
Scriptor
Posts: 29
Joined: Tue Oct 01, 2019 12:07 pm

Re: Getting EXIF field "OriginalRawFileName"?

Post by Scriptor »

Hey!
Adobe Bridge > Metadata > Camera RAW > RAW Filename

Yes, there's a difference in the original name and the current name:/
User avatar
Stephen_A_Marsh
Posts: 37
Joined: Sun Aug 04, 2019 12:37 pm

Re: Getting EXIF field "OriginalRawFileName"?

Post 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);  
//////////////  
}
User avatar
Scriptor
Posts: 29
Joined: Tue Oct 01, 2019 12:07 pm

Re: Getting EXIF field "OriginalRawFileName"?

Post 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!
User avatar
Stephen_A_Marsh
Posts: 37
Joined: Sun Aug 04, 2019 12:37 pm

Re: Getting EXIF field "OriginalRawFileName"?

Post by Stephen_A_Marsh »

The GUI can often be misleading, much better to use File Info > Raw Data
User avatar
Kukurykus
Posts: 528
Joined: Mon Jul 25, 2016 12:36 pm

Re: Getting EXIF field "OriginalRawFileName"?

Post by Kukurykus »

Can you be more specific and tell me where exactly in Bridge is: Metadata (field), since I can't find it anywhere...
User avatar
Scriptor
Posts: 29
Joined: Tue Oct 01, 2019 12:07 pm

Re: Getting EXIF field "OriginalRawFileName"?

Post 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!
User avatar
Kukurykus
Posts: 528
Joined: Mon Jul 25, 2016 12:36 pm

Re: Getting EXIF field "OriginalRawFileName"?

Post 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.
User avatar
Scriptor
Posts: 29
Joined: Tue Oct 01, 2019 12:07 pm

Re: Getting EXIF field "OriginalRawFileName"?

Post 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! :)