Using exiftool with Automator in Yosemite

Started by Bosque Bill, November 18, 2015, 12:18:37 PM

Previous topic - Next topic

Bosque Bill

Quote from: Phil Harvey on November 19, 2015, 12:17:23 PM
It would really save me time if you could post your Automator script.
Oh, you mean the workflow file itself? OK, I'll attach it.

Phil Harvey

#16
There we go.

Try this.

I changed the "Pass input:" settings in your shell script from "to stdin" to "as arguments" and it fixed the problem.  Also, I got rid of your for loop.

Note that I have never done anything in Automator, so this problem was solved by trial and error at my end.

- Phil

Edit: Out of interest, I can also get it to work with "Pass input:" set to "to stdin" by adding "-@ -" to the exiftool command.  (So ExifTool reads arguments from stdin.)
...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 ($).

Bosque Bill

Outstanding! It works now for me, too - both methods.

Thanks so much, Phil. You may not have had much experience with Automator (neither have I, obviously), but you've had lots more experience with scripting, I'm sure.

As a small token of appreciation for your time, I've sent you a "cup of coffee" via your PayPal donation link.

Bill

Phil Harvey

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

Bosque Bill

#19
I've now created a "Spring Forward" Automator script to complement my "Fall Back" script. (Though I hope come spring I remember to adjust the time in my cameras before taking lots of photos!)

If anyone reading this uses Adobe Bridge, note that the program caches the EXIF data. When I tested my scripts on a couple CR2 files in Finder, the changes didn't show up in Bridge right away - I figured ExifTool worked, as I saw the tmp file being created and deleted in Finder. In the top menu in Bridge you can click Tools > Cache > Purge cache for [folder] to see the changes in the EXIF data.

[update: if you have the target folder open in Bridge when you modify the files with ExifTool, Bridge appears to update itself as the script works through the files and you can see your results. In my original test I did not have the folder open in Bridge and had to manually purge the folder cache; that's the opposite of what I'd expected.]

ExifTool is a super utility, that I hope I don't have to use too often ;-)  I'm going to spread the word to my photography friends.