I am trying to set keywords in a lot of files. I can generate tables associating the keywords with the files, and write the data to an argument file for use with the -@ keyword. But the "simple" test case is running amok.
I enter the command:
exiftool -L -sep " : " -common_args -@ test1.args
with the attached file.
When I do this I get an un-ending stream of "2 files updated" (or something very similar) and have to closed the DOS-box to stop it.
When I check the files I find the two .jpg files, with no keywords set, plus to .jpg_original files with the same names, plus one .jpg_exiftool_tmp for one or the other file (which has to be erased before I can try again).
I've tried this with an -execute key at the end, with the same results.
Clearly I don't understand the format of the batch argument file, but I can't seem to find any examples of "good" argument files. I do need the "EXIFTOOL for Dummies" book!
There are a few things I don't understand (like the _tmp file), but let's start with the things that I do:
-keyword=Mintz, Helen : Baron, Helen
1948-06-13 - Page 07 4.jpg
-execute
-keyword=Baron, David : Mintz, Helen : Baron, Helen
Dancing II.jpg
1) The tag name is Keywords, not Keyword
2) The command is structured incorrectly, it should be:
exiftool -@ test1.args -common_args -L -sep " : "
because you want the arguments -L -sep " : " to be common to all commands.
- Phil
Thank you very much. Pure dumbness as to the tag name (I could claim poor eyesight, but it wouldn't be true).
I jumped to the conclusion (incorrectly) that the argument file was invoked immediately on encountering the -@. I should have known better, as on reflection it is clear that all the arguments are gathered together and then executed in an order that is not totally sequential. I had thus thought that the common arguments had to preceed the transfer of source to the argument file. (Is that English?)
As to the _tmp file, with my messed up command and argument file the only way to stop the program was to hit the "X" icon on the command window, and that killed in the middle of whatever it was endlessly doing, leaving a temporary file behind.
Again, thank you, and perhaps I can get this working.
I should look over the use of exiftools as a subroutine from other programs, as my data collection is being done in Clisp. But it is 20 years since I did any programming, and having to face foreign function calls is a bit daunting!
Quote from: calberga on July 07, 2011, 08:53:12 AM
As to the _tmp file, with my messed up command and argument file the only way to stop the program was to hit the "X" icon on the command window, and that killed in the middle of whatever it was endlessly doing, leaving a temporary file behind.
Ah, right. I hadn't considered this. The way you had it, the arguments common to all commands were "
-@ test1.args", which would recursively load the arguments file for each command, including the commands in the arguments file, resulting in an infinite recursion. Whoa. Nasty.
- Phil
Folly often causes more damage than malice!