save only the last part after "/" from the dir name

Started by BeTePoK, December 12, 2023, 06:06:16 PM

Previous topic - Next topic

BeTePoK

Hello. Tell me, please, how to leave only the last part after "/" from the full directory name? F:\Photos\Location\SpecialName. Only "SpecialName" required.
-title<${directory;SpecialName}

Thanks

Phil Harvey

Something like this should do it:

exiftool "-title<${directory;s(.*/)()}" -r DIR

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

BeTePoK