I hope someone can help me with a regex solution. I'm trying to add part of a filename structure into DC:title, but I'm not sure how to do it with regex. I have a file name structure for multiple images where the filename can be like this:
one_pic00001.jpg
(my file names are always using this structure, three characters, an underline, three more characters and then five numbers and the extension).
Now what I would like is to strix the first part one_ , and add a space between pic and 00001. I would like the tag Title to be: pic 00001
Do anyone know how to solve this using an regex expression? Grateful for any suggestions.
There are many ways to do this. Here is one:
exiftool "-title<${filename;$_=substr($_,4,3).' '.substr($_,7,5)}" DIR
- Phil
Thank you!! It works perfectly! I really appreciate the lightning fast help here. :)