[Originally posted by edh on 2007-12-13 20:51:18-08]I am using the command line exiftool for windows. I am able to successfully write the filename to the EXIF IPTC caption area with this command:
exiftool -overwrite_original -P "-iptc:caption-abstract<filename" "-iptc:writer-editor=Ed H" *.jpg
This is close to my goal, but what I would really like is to write the filename less the extension. The command above leaves .JPG on the end of my captions, and I would like filename sans extension.
I have tried the following with no luck:
exiftool -overwrite_original -P "-iptc:caption-abstract<basename" *.jpg
exiftool -overwrite_original -P "-iptc:caption-abstract<%f" *.jpg
[Originally posted by exiftool on 2007-12-14 12:06:15-08]Take a look at the
user-defined
tag documentation. The sample config file defines the
Basenametag that you wanted (in the Composite tags).
- Phil
[Originally posted by edh on 2007-12-14 23:32:18-08]Hi again Phil,
OK, nifty, I thought I had to recompile to use that file, but I guess not. So I copied
https://exiftool.org/config.html user-defined tag documentation to my system, renamed it to
.ExifTool_config created an environment variable
EXIFTOOL_HOME that points at
C:\Program Files\exiftool (where I put exiftool.exe). Then tried this command
exiftool -overwrite_original -P "-iptc:caption-abstract<Basename" "-iptc:writer-editor=Ed H" W*.jpg
Unfortunately, get this error:
Can't use string ("FileName") as a HASH ref while "strict refs" in use at Image/ExifTool.pm line 1389, <EXIFTOOL_FILE> line 11.
Do I need to change anything else in the .ExifTool_config file? Looks like it is a NameSpace issue?
Thanks!
[Originally posted by exiftool on 2007-12-15 01:42:34-08]
It sounds like there is a format error in your config file.
Instead of working from the html documentation, try using
the "ExifTool_config" file in the full exiftool distribution.
- Phil