ExifTool Forum

ExifTool => Newbies => Topic started by: BeTePoK on December 12, 2023, 06:06:16 PM

Title: save only the last part after "/" from the dir name
Post by: BeTePoK on December 12, 2023, 06:06:16 PM
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
Title: Re: save only the last part after "/" from the dir name
Post by: Phil Harvey on December 12, 2023, 09:42:58 PM
Something like this should do it:

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

- Phil
Title: Re: save only the last part after "/" from the dir name
Post by: BeTePoK on December 13, 2023, 06:29:15 AM
Thank you! It's simple when you have knowledge)