Where to save "orginal file name"

Started by Jim, May 10, 2019, 03:17:12 PM

Previous topic - Next topic

Jim

I want to save the camera-generated name of image files to the meta data.  (I often rename images when post-processing and exporting and would like to be able to return to the original raw file.)  It is my understanding that I can not create my own tag name to write to but can only write to one of the (very many) tags known to ExifTool.

My question is what is a good tag name to choose and, probably more important, what group to put it in.  I presume any unused tag would do the trick but would like to make a selection that's more rational than random.

Thanks in advance for your help.


StarGeek

Quote from: Jim on May 10, 2019, 03:17:12 PM
It is my understanding that I can not create my own tag name to write to but can only write to one of the (very many) tags known to ExifTool.

You can create your own tag names (see the example.config file for details) but when you do so, most software will be unable to read it.  But in this case, there are pre-existing tags for this purpose.

QuoteMy question is what is a good tag name to choose and, probably more important, what group to put it in.  I presume any unused tag would do the trick but would like to make a selection that's more rational than random.

Technically, the proper place, according the IPTC spec, would IPTC:ObjectName and/or XMP:Title (see here).  The major problem with this is that Adobe has appropriated these tags for use as the Title field, a short description of the image, which technically should be the Headline tag (see here).

Adobe instead uses XMP:PreservedFileName to hold the original filename.

Any or all of these tags would be the appropriate place to put the original filename, depending upon what software you use and if they can read these tags.

Myself, I write all three of these tags as the first step after downloading images from my camera
exiftool -P -overwrite_original "-XMP:PreservedFileName<Filename" "-XMP:Title<Filename" "-IPTC:ObjectName<Filename"
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Stephen Marsh

I personally would recommend using the Adobe Bridge tag:

-XMP-xmpMM:PreservedFileName

___________

Copy filename to Adobe Preserve Original Filename metadata entry (excluding filename extension), -Preserving the modified date/time:

exiftool -P -overwrite_original_in_place '-XMP-xmpMM:PreservedFileName<${filename;s/\.[^.]*$//}' -r 'FILEorDIR'

___________

Copy filename to Adobe Preserve Original Filename metadata entry (including file extension):

exiftool -overwrite_original_in_place '-XMP-xmpMM:PreservedFileName<${filename}' -r 'FILEorDIR'

___________

Rename files using their preserved filename metadata entry:

exiftool '-FileName<XMP-xmpMM:PreservedFileName' -r 'FILEorDIR'