charactermetadataiptclightroomadobe-bridge

I like to get IPTC's Title or Description character count


I like to get IPTC's Title or Description character count and get files over 195 character count somehow marked - In Adobe Bridge either sort, or label, or rate them (with a script or a plugin) - In Lightroom somehow - In any other tool with

E.g. moving the files to a directory would be sufficient

Renaming is not an option, duplicate and rename is fine


Solution

  • You could do this on the command line/bash/terminal with ExifTool and the following command.

    exiftool -if "${Description;$_=length()}>195" -Directory=/path/to/moved/ /path/to/source/

    To change the label on the those files, you would use
    exiftool -if "${Description;$_=length()}>195" -Label="Some Text" /path/to/source/
    Replace Some Text with what you want the label to say.

    If used in terminal/bash, double/single quotes need to be swapped to avoid bash interpretation parts of the command as variables.


    To get approximate word count as per original post:

    exiftool -if "${Description;$_=(()=/ +/g)+1}>195" -Directory=/path/to/moved/ /path/to/source/

    This command does a quick and dirty regex count of all the spaces between words in the Description and moves any files with a count greater than 195 to the /path/to/moved/ directory. It's not 100% perfect, for example it doesn't take into account things like dashes, i.e. before—after would be counted as one word.