Want to fill IPTC:Caption with photo filename - without the extension

Started by concord977, June 23, 2011, 08:59:58 PM

Previous topic - Next topic

concord977

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

Phil Harvey

There are a few threads on this subject.  here is one.

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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).