ExifTool Forum

ExifTool => Developers => Topic started by: DGMAC on September 07, 2017, 06:19:33 PM

Title: Warning: Error opening file -*, in Apple Automator
Post by: DGMAC on September 07, 2017, 06:19:33 PM
Following Agill's guide with a few tweaks for El Capitan I have the following Shell Script working in Automator, although it returns an error:

for f in "$@"
do
   /usr/local/bin/exiftool −r −overwrite_original -TagsFromFile @ '-Description<$XMP:Subject $FilePath' *, "$f"
done

The error reads: 'Warning:Error opening file - *,

The command is correctly recursively copying keyword and directory path metadata to the description field for all files in whatever folder I select (so it will be searchable in Google Photos), but I would like to stop getting the warning error when it is executed. Any help appreciated.
Title: Re: Warning: Error opening file -*, in Apple Automator
Post by: StarGeek on September 07, 2017, 07:08:49 PM
Sorry, I should have caught this before.  You can't use -r and a wildcard.  See Common Mistake 2c (http://www.exiftool.org/mistakes.html#M2).  Just remove the *. 
Title: Re: Warning: Error opening file -*, in Apple Automator
Post by: DGMAC on September 08, 2017, 10:29:50 AM
Thanks, that did it.