ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: derkolarsky on April 17, 2021, 05:16:33 PM

Title: Content of FileName copied to Title but without extension
Post by: derkolarsky on April 17, 2021, 05:16:33 PM
Hi everyone,

I've searched pretty hard to find an understandable solution for me but my brain suddenly tilted...  :-\

I want to copy the information from FileName to Title but simply drop the file extension. I found lots of stuff stating ...;s/ \... but I wasn't able to use it for me.
My basic command is exiftool *.m4a "-Title<FileName" but then it also copies the file extension. Is there a simple solution to have some RegEx-Part just removing the extension out of the info?
And a short explanation of the syntax would be pretty cool...

Really appreciate your input.

Thanks in advance
Ralf
Title: Re: Content of FileName copied to Title but without extension
Post by: StarGeek on April 17, 2021, 07:08:21 PM
If you're using exiftool Version 12.22 or higher, you can use this command
exiftool *.m4a "-Title<BaseName"

Basename was an example user defined tag in the example.config file (https://raw.githubusercontent.com/exiftool/exiftool/master/config_files/example.config), but is now a built-in Extra tag (https://exiftool.org/TagNames/Extra.html).