ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: ssApollo18 on October 20, 2015, 01:32:27 PM

Title: Exiftool not functioning in AppleScripts in El Capitan
Post by: ssApollo18 on October 20, 2015, 01:32:27 PM
Mac OS X El Capitan 10.11
Exiftool ver. 10.02

My photography workflow uses Hazel to rename photo files based on their metadata and then sort them into sub-folders in my dropbox. I have noticed that the shell scripts are failing to run after I upgraded to El Capitan. It appears the exiftool exec is no longer loaded in the correct place. Also, exiftool is still functioning in the terminal, it just is failing to load when run through hazel giving me the below error message.

Applescript I am attempting to run through Hazel:

exiftool -P -d '%Y-%m-%d' at '%H-%M-%S'
   '-filename<${FileModifyDate;}%-c.%e'\
    '-filename<${GPSDateTime;}%-c.%e'\
    '-filename<${MediaCreateDate;}%-c.%e'\
    '-filename<${ModifyDate;}%-c.%e'\
    '-filename<${DateTimeOriginal;}%-c.%e'\
    "$1"

exiftool "-FileName>FileModifyDate" -d "%Y:%m:%d %H:%M:%S" -overwrite_original_in_place "$1"

Error Message:
2015-10-20 11:20:23.221 hazelworker[2343] [Error] Shell script failed: Error processing shell script on file /Users/Apollo18/Desktop/Sort/NAok3jp.jpg.
2015-10-20 11:20:23.221 hazelworker[2343] Shellscript exited with non-successful status code: 2

Is there a fix for this or an update in the works for future exiftool versions?
Title: Re: Exiftool not functioning in AppleScripts in El Capitan
Post by: Phil Harvey on October 20, 2015, 04:23:34 PM
The current OS X package installs ExifTool in /usr/local/bin.  This change was necessary because El Capitan won't allow installation in /usr/bin.

Unfortunately, /usr/local/bin may not be in the path for some scripts.  To fix this, put the full path to exiftool (/usr/local/bin/exiftool) in the script.

- Phil