When I try to run a certain command recursively it exist with exit code 2. The -v flag reveals the following underlying error for each file in the directory, where the last part of the error is the file:
Condition: Bareword "documentid" not allowed while "strict subs" in use - ./DSCN1053.JPG
Googling the error points to others having this problem with Perl scripts. There was one person who had this message in the old forum, but alas, it is no longer viewable.
I am using exiftool 13.25 in Debian 13 using the bash shell.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying to run the following command on a directory with 1,600 files:
When I try to run a certain command recursively it exist with exit code 2. The -v flag reveals the following underlying error for each file in the directory, where the last part of the error is the file:
Googling the error points to others having this problem with Perl scripts. There was one person who had this message in the old forum, but alas, it is no longer viewable.
I am using exiftool 13.25 in Debian 13 using the bash shell.
Running the command on a single file, without the
-rflag works as expected.Technically, it is only working "as expected" because the
-ifoption is broken.From the docs on the
-ifoptionIn the expression, you are using the bare word "documentid" and not the tag name
DocumentID.Also, a minor item is that you are making Common Mistake #5b, "Adding a leading "$" when copying a simple tag".
Try this:
exiftool -overwrite_original -P '-documentid<filename' -if 'not $documentid' -progress -r .