-1

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

SupWP
  • 17
  • 6

1 Answers1

0

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.

StarGeek
  • 4,948
  • 2
  • 19
  • 30
  • Sorry I mistyped, I need 195 character count. Good for start – SupWP May 09 '20 at 18:51
  • That's even easier, updated post. You should correct your original question. Additionally, instead of moving, you could set a tag such as `Label` and view the results in LR – StarGeek May 09 '20 at 19:27
  • How should I add the tag? That would be better. (Not to mess with original database of images) – SupWP May 09 '20 at 21:46
  • I get this message: 1 directories scanned 27 files failed condition 0 image files read ... I had run this code: exiftool -if "${Description;$_=(()=/ +/g)+1}>195" -Directory="F:\vektor 2019\200 char test\195 felett" "F:\vektor 2019\200 char test" – SupWP May 09 '20 at 22:17
  • I'm using "IPTC core" to label, descriptions in Bridge – SupWP May 09 '20 at 22:45
  • I double checked and has files over 195 chars – SupWP May 10 '20 at 00:37
  • Make sure and use the correct command I listed above. The first command is for number of characters. Your comment used the command for number of words. – StarGeek May 10 '20 at 00:47
  • Yep. Worked. Thank you very much for the fast solution / answer! For others: note an "e" missing from "dirEctory" – SupWP May 10 '20 at 15:30
  • Ooops, fixed it. – StarGeek May 10 '20 at 16:12