Skip to main content
Participant
October 7, 2022
Question

Find the original name of an image

  • October 7, 2022
  • 4 replies
  • 3053 views

I create .jpg files with a title of my choosing. However, I frequently need to find the original out-of-camera raw file. For example, I can have an image called "sunny day".jpg which was generated from a raw file called DSC_0794.NEF. How can I either find the raw file name (DSC_0794.NEF) in the data of the jpg or can I use a function in bridge to add the name somewhere in the metadata so it will be retained and I can find it when I need it.

This topic has been closed for replies.

4 replies

Stephen Marsh
Community Expert
Community Expert
October 8, 2022

Something else worth mentioning, adding the Preserved Filename metadata can also be performed via a Photoshop script, as an alternative to Bridge.

 

This may fit better into a particular workflow.

 

/*
Write filename to 'PreservedFileName' metadata field
https://www.ps-scripts.com/viewtopic.php?f=66&t=42079
by Kukurykus » Tue Aug 23, 2022 4: 52 pm
*/

!ExternalObject.AdobeXMPScript && ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');
(meta = new XMPMeta((xmp = (aD = activeDocument).xmpMetadata).rawData)).setProperty('http://ns.adobe.com/xap/1.0/mm/', 'PreservedFileName', aD.name), xmp.rawData = meta.serialize();

 

https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html

Stephen Marsh
Community Expert
Community Expert
October 8, 2022

@davidlarkin64 

 

It depends on how you create your derivative files. Export As and Export Save for Web (Legacy) can strip many metadata entries.

 

Using Save As/Save As a Copy includes all the metadata that a particular file format can hold.

 

I opened up a raw camera file and used Save As to JPEG.

 

Looking at the metadata in ExifTool, the original filename is included under:

 

-Photoshop:SlicesGroupName

 

However, this metadata is not visible in Adobe's File > File Info > Raw Data

 

ExifTool could copy this -Photoshop:SlicesGroupName to another metadata field such as the -XMP-xmpMM:PreservedFileName which would be more visible in Adobe apps. 

 

Other useful metadata could be the -XMP-xmpMM:DocumentID which is included in derivative files where data was copied/pasted or placed and will then be included as the infamous -XMP-photoshop:DocumentAncestors metadata.

 

If a file has simply been re-saved via a Save As then it will include the -XMP-xmpMM:OriginalDocumentID entry.

 

All of these methods can be used to find derivative files, however, as metadata can be removed from files, there is no foolproof method.

 

D Fosse
Community Expert
Community Expert
October 7, 2022

The Bridge metadata panel has a listing for "Preserved Filename":

Participant
October 7, 2022

Thanks that's what I need! I've played around with it and it looks like I need to do a batch rename to populate the Preserved Filename. I'll try now to create a workflow that applies this to all the files in a folder when I open it in Bridge. Thanks, both for your help... 

D Fosse
Community Expert
Community Expert
October 7, 2022

You decide which fields you want to show in Bridge:

Inspiring
October 7, 2022

You can do this by adding it as a keyword in the metadata.

Or you could write a little powershell script that batches an entire collection at once, so the solution isn't necessarily limited to photoshop/bridge.