Warning: Error opening file -*, in Apple Automator

Started by DGMAC, September 07, 2017, 06:19:33 PM

Previous topic - Next topic

DGMAC

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.

StarGeek

Sorry, I should have caught this before.  You can't use -r and a wildcard.  See Common Mistake 2c.  Just remove the *. 
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).