ExifTool Forum

ExifTool => Newbies => Topic started by: tm on March 19, 2012, 06:00:01 PM

Title: sort files by keywords
Post by: tm on March 19, 2012, 06:00:01 PM
hey,

I'm a bit into applescript and my scripts work well so far (tagging jpgs and tifs with filename-based information etc)

Now I'm trying to sort tifs by keywords being tagged by some photographers.

keywords are for example: #095A; #M757

so. i tried folllowing code to see what i get from the keywords:
___________

set afile to choose file
set filename to quoted form of POSIX path of afile
set keyword to do shell script "exiftool -iptc:keywords " & filename
_______

the result I get is

"Keywords                        : #095A, #M757"

I need to get the pictures with one or both of these keywords. To manage the different order of #095A and #M757
(only one of them or both or both in the opposite order) I set up a List containing the different possibilities to check whether the result of the shell script is in the list.

My problem is,  that the result is not only the keyword(s) but the "Keywords                        : " before the actual keywords.

Is it possible to get rid of the "Keywords                        : " ?

Thanks,
Sebastian.


Title: Re: sort files by keywords
Post by: Alan Clifford on March 19, 2012, 09:29:44 PM
Use

-s3

in the command line.
Title: Re: sort files by keywords
Post by: tm on March 20, 2012, 02:08:44 AM
Thank You!

Is there any source where I could have found it by my self?

Greets
Sebastian
Title: Re: sort files by keywords
Post by: Phil Harvey on March 20, 2012, 07:25:42 AM
Hi Sebastian,

This is described in the application documentation (https://exiftool.org/exiftool_pod.pdf). (page 12)

- Phil

Edit: added page number
Title: Re: sort files by keywords
Post by: tm on March 20, 2012, 02:02:27 PM
Ah,

thanks a lot!