ExifTool Forum

General => Metadata => Topic started by: cdubea on July 07, 2025, 11:17:07 AM

Title: Need a favor from a Exiftool guru
Post by: cdubea on July 07, 2025, 11:17:07 AM
So,

In the preceding months, I've transitioned my image ingest duties from LightRoom v6.14 on a Windows box to Rapid Photo Downloader (https://damonlynch.net/rapid/) on a Linux box.

RPD works well, but one of the things it doesn't do is any kind of IPTC metadata handling.

Typically, I will ingress to a folder thusly:

/photos/2025/0617-Wyatt

And rename the photos in the folder thusly:

20250617-Wyatt.001.jpg

I use Capture One for my post-processing, but unfortunately metadata handling in C1 is challenging. It's possible, but it's a cluge at best.

Would some kind soul please advise an ExifTool command to set the descriptor of the file (in this case Wyatt) to be the IPTC Caption for a folder full of images? Obviously, the descriptor would be different for different folders.

Thank you.
Title: Re: Need a favor from a Exiftool guru
Post by: Phil Harvey on July 07, 2025, 07:53:16 PM
Hi Chris,

You want the file descriptor written to the IPTC Caption-Abstract?  The first time I read your post I thought you wanted the descriptor to be set from Caption-Abstract, and I wrote out a whole response then figured you probably meant the other way around.  So here goes again...

The command would be something like this:

exiftool "-iptc-caption<${filename;s/^(\d+-)//;s/\..*//}" DIR

The quoting is for Windows.  But I wouldn't be surprised if you are talking about some tag other than IPTC:Caption-abstract because the old IPTC/NAA is becoming obsolete.  Use exiftool -s on a file that already contains a caption to determine which tag you should be using.

- Phil
Title: Re: Need a favor from a Exiftool guru
Post by: StarGeek on July 08, 2025, 10:02:43 AM
Alternatively, you could use the Basename tag.
exiftool "-iptc-caption<${Basename;s/^(\d+-)//}" DIR

What these commands are doing is stripping away any leading numbers followed by a dash from the filename. Hopefully, that is what you want done.
Title: Re: Need a favor from a Exiftool guru
Post by: cdubea on July 09, 2025, 01:27:34 PM
Thank you, I'll give them a try and report back
Title: Re: Need a favor from a Exiftool guru
Post by: Phil Harvey on July 09, 2025, 02:49:08 PM
I don't think that Basename will do it because the base name given in the example would be "20250617-Wyatt.001", but I think we want the ".001" removed.  I think my command will do that.

- Phil