Hello all,
I'm a searching a way to rename a jpg file, with a name based of my IPTC:Headline tag.
Where it add a bit of complexity, is that my IPTC:Headline is of that form : image name in french/image name in english.
What I want to do is to obtain a filename like image-name-in-french.jpg.
I've tried something like this : exiftool -filename<${IPTC:Headline;}.%e
but the semicolon only remove the /. I would like to find something to remove the portion of the IPTC:Headline tag value after the /. I don't see at that time a way to do that.
Any idea?
Thank you by advance
Ok, I tryed this and it seems to work :
-Filename<${IPTC:Headline;s/\/.*//}.%e
Now I would like to turn all uppercase letters in my filename into lowercase. Is there a way?
Thank you!
Try -Filename<${IPTC:Headline;s/\/.*//;lc}.%e
lc will make everything lowercase. Use uc to make everything uppercase.
Well, thank you Hayo, but it doesn't work.
I'm trying to find how to use the "lc" commande, but don't see... If you have an idea?
Just one minor change and this should work: -Filename<${IPTC:Headline;s/\/.*//;$_=lc}.%e
You must assign the lc value back to $_ to actually change the value.
- Phil
And it works!!
Thank you Phil, I understand.