ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: j99mac on October 27, 2015, 09:24:52 AM

Title: error running script
Post by: j99mac on October 27, 2015, 09:24:52 AM
I have used this script before. I just updated to latest version of Exiftool and it no longer works. The error I am getting is "sh: /usr/bin/exiftool: No such file or directory"

display dialog "Add Metadata Tag" buttons ["Add"]
set the button_pressed to the button returned of the result
   
if button_pressed = "Add" then
      set TiffInfo to ""
      set theFolder to (choose folder)
      tell application "Finder" to set theFiles to every file of entire contents of theFolder as alias list
      repeat with eachFile in theFiles
         set TiffInfo to TiffInfo & (do shell script "/usr/bin/exiftool -EXIF:Artist='Artist' -overwrite_original " & quoted form of POSIX path of eachFile) & return
      end repeat
   end if
Title: Re: error running script
Post by: Phil Harvey on October 27, 2015, 10:34:19 AM
Blame El Capitan for breaking this.

There are a number of threads with this problem.

The OS X install now installs in /usr/local/bin instead of /usr/bin (due to El Capitan restrictions), but some script environments don't have /usr/local/bin in the path.  So to fix this, specify /usr/local/bin/exiftool instead of just "exiftool" in the script.

- Phil