sort files by keywords

Started by tm, March 19, 2012, 06:00:01 PM

Previous topic - Next topic

tm

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.



Alan Clifford


tm

Thank You!

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

Greets
Sebastian

Phil Harvey

#3
Hi Sebastian,

This is described in the application documentation. (page 12)

- Phil

Edit: added page number
...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 ($).

tm