ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: msbc on May 01, 2011, 05:43:18 AM

Title: Adding part of image filename to metadata
Post by: msbc on May 01, 2011, 05:43:18 AM
Hi,

I'd like to add part of the image filename (not including the file extension) to the Title tag but can't work out how. Would really appreciate some tips.

Example: for image MSC_2011-04-04_1234.CR2 I want to write "MSC_2011-04-04_1234" to Title.
exiftool "title<filename" -ext CR2 . will get me the whole filename but I want to drop the file extension.

Thanks,
Mark
Title: Re: Adding part of image filename to metadata
Post by: ryerman on May 01, 2011, 10:03:20 AM
We call that "basename".
Search the forum for basename and you will find some help.
Here's a start:  https://exiftool.org/forum/index.php/topic,2373.0.html (https://exiftool.org/forum/index.php/topic,2373.0.html)

Jim