ExifTool Forum

ExifTool => Newbies => Topic started by: concord977 on June 23, 2011, 08:59:58 PM

Title: Want to fill IPTC:Caption with photo filename - without the extension
Post by: concord977 on June 23, 2011, 08:59:58 PM
I am using the following command to fill the IPTC:Caption field with the filename of my photos.

     exiftool "-IPTC:Caption-Abstract<filename"

This is working, except that the ".jpg" is also included in the field.

Is there a way to exclude the .jpg when I do this?


Note:  the filenames are complex, such as:  "N757VA  Boeing 757-223  KIAD  20090115.jpg"



Edit:  I did search for this subject in older posts.  I found one similar question, but the specifics were not the same.

PH Edit: fixed typo in command
Title: Re: Want to fill IPTC:Caption with photo filename - without the extension
Post by: Phil Harvey on June 24, 2011, 07:11:43 AM
There are a few threads on this subject.  here is one (https://exiftool.org/forum/index.php/topic,1926.msg8419.html).

The answer is to create a user-defined tag.  The sample config file included with the full distribution has a "Basename" tag which does exactly this.

- Phil