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: xbytor, DavideBarranca, Paul MR

Post Reply
Scriptor
Posts: 7
Joined: Tue Oct 01, 2019 12:07 pm

Getting EXIF field "OriginalRawFileName"?

Post by Scriptor » Tue Oct 01, 2019 12:16 pm

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!

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

Re: Getting EXIF field "OriginalRawFileName"?

Post by Kukurykus » Wed Oct 02, 2019 2:39 pm

Where can we see that Raw Filename displayed in Bridge and is there any difference between current name and original?

Scriptor
Posts: 7
Joined: Tue Oct 01, 2019 12:07 pm

Re: Getting EXIF field "OriginalRawFileName"?

Post by Scriptor » Thu Oct 03, 2019 5:11 am

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: 4
Joined: Sun Aug 04, 2019 12:37 pm

Re: Getting EXIF field "OriginalRawFileName"?

Post by Stephen_A_Marsh » Thu Oct 03, 2019 11:19 am

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);  
//////////////  
}

Scriptor
Posts: 7
Joined: Tue Oct 01, 2019 12:07 pm

Re: Getting EXIF field "OriginalRawFileName"?

Post by Scriptor » Fri Oct 04, 2019 7:10 am

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: 4
Joined: Sun Aug 04, 2019 12:37 pm

Re: Getting EXIF field "OriginalRawFileName"?

Post by Stephen_A_Marsh » Fri Oct 04, 2019 11:44 pm

The GUI can often be misleading, much better to use File Info > Raw Data

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

Re: Getting EXIF field "OriginalRawFileName"?

Post by Kukurykus » Sun Oct 06, 2019 6:56 am

Can you be more specific and tell me where exactly in Bridge is: Metadata (field), since I can't find it anywhere...

Scriptor
Posts: 7
Joined: Tue Oct 01, 2019 12:07 pm

Re: Getting EXIF field "OriginalRawFileName"?

Post by Scriptor » Tue Oct 08, 2019 1:03 pm

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: 223
Joined: Mon Jul 25, 2016 12:36 pm

Re: Getting EXIF field "OriginalRawFileName"?

Post by Kukurykus » Thu Oct 10, 2019 2:09 pm

Ah, right, for no raw files there is no that raw filename avialable. I tried on jpg originally. On raw it's displayed.

Scriptor
Posts: 7
Joined: Tue Oct 01, 2019 12:07 pm

Re: Getting EXIF field "OriginalRawFileName"?

Post by Scriptor » Tue Oct 15, 2019 4:51 am

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

Post Reply