executing exiftool from AppleScript: why failing (Solved)

Started by jaladuvar, May 01, 2020, 05:00:04 AM

Previous topic - Next topic

jaladuvar

Hello I don't know if I post in the right forum, if not please advise me...

I've got an apple script which reads tags at different lines (all exiftool command lines return value in the terminal) but one returns nothing when run in Applescript do shell script why this ?
Line 1 : set the_list_items to do shell script "/usr/local/bin/exiftool -config .test_config.config -MyCritdates -s3 -t -d %Y%m%D-%H:%M:%s " & quoted form of unfile
retenus nothing when but returning this when run in terminal:
20101120-02:58:22 20101120-02:58:22 20101120-02:58:22 20101120-09:58:21 20101120-09:58:21

Line 2 :set old_date to do shell script "/usr/local/bin/exiftool -config .oldest_datetime_config.config -OldestDateTime -s " & quoted form of un_file
returns: 2010:11:20 02:58:22 same return in terminal
The first config file was not in the proper directory, the second one was duplicated into different places... :-[

Phil Harvey

It would be safest to specify a full path for the config file, eg:

/usr/local/bin/exiftool -config /Users/phil/.oldest_datetime_config.config ...

Then you don't have to worry about which working directory AppleScript is using.

- Phil
...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 ($).