I'm working on a couple of Automator scripts containing shell commands which should work as drag & drop applications to put in the OSX dock (allowing files or folders where the image-files within will be processed by it). The terminal commands work fine in the OSX terminal but I'm having some minor issues when trying to adapt them for the script. Here's what the first script looks like. The "Get specified Finder items" points to a folder full of test images. There's a minor warning at the bottom (log) section, but this is just the same if I issue it in the OSX terminal and IMHO the script so far is working like it should. Code: export PATH="$PATH:/usr/local/bin" for f in "$@" do exiftool -r "-AllDates<MDItemContentCreationDate" "-XMP-Exif:DateTimeDigitized<MDItemContentCreationDate" -P -if 'not $exif:AllDates' -overwrite_original_in_place "$f" done For comparison, here's the same command issued within the OSX Terminal: But if I run the script a second time I get a more serious error message. The script should check to see if the image(s) selected already have ann "AllDates" EXIF tag, and if so it should skip the file and move on to the next one. I suspect this is the cause for the error (as I've already run the script once to process the files, which adds this EXIF tag to the files which don't have them): Again, for comparison purposes, here's what that command looks like when issued from the OSX Terminal for the second time: What do I need to change in the Automator script to solve this issue? And is there a way I can have the summary results (1 directory scanned, 8 files failed condition, 9 image files updated) shown, perhaps in the alert window I've made using the Applescript action?