syntax Q + feature req --> "warning: entire file is binary zeros"

Started by martenzi, December 01, 2018, 12:05:32 PM

Previous topic - Next topic

martenzi

Q. is it possible to write something like:
exiftool -if '$warning:"entire file is binary zeros" or $error' 

I would also love to have a list of explanations on the available warning and error messages, or at least the most common ones.

"warning: entire file is binary zeros" The warning is relatively descriptive of the raw problem with the file. However, linguistically I would definitely associate this with a direct Error. I think you have designed it so that the message relays a warning about processing the file while ExifTool has no issues running and the syntax may be perfect.
You once helped me with a conditional statement
-if '$warning or $error' ...
I want to either identify binary files or skip them when processing and I can do this by using the above to move files to a different folder or use a negated version. Then I have to use other tools or simply filter further by using validation by elimination. This can be quite laborious since there are quite a few minor issues with various camera sources and many of these are irrelevant to the bigger picture of finding images that simply works, but may have metadata issues etc. I have tried to expand the details of the warning and error message specificity in my syntax but it results in a fishing expedition.

Q. is it possible to filter the specific warning and/or error messages in the syntax?
I do not want to suppress by using -m or -q because it may affect the name of the directory based on available tags.

I also noticed a related issue. When I validate files to a csv, I have not found a way to make the column expand and include all the listed warnings. If a file has 7 issues, only the initial seems to be listed in the column and cut off. Is there a way to also make the columns vertical?

Phil Harvey

Quote from: martenzi on December 01, 2018, 12:05:32 PM
Q. is it possible to write something like:
exiftool -if '$warning:"entire file is binary zeros" or $error' 

exiftool -if '$warning =~ /binary zeros/'

QuoteI would also love to have a list of explanations on the available warning and error messages, or at least the most common ones.

They are designed to be self explanatory as much as possible with about an 72 character limit.  Documenting all of them in detail would be very difficult.

Quote"warning: entire file is binary zeros" The warning is relatively descriptive of the raw problem with the file. However, linguistically I would definitely associate this with a direct Error.

This actually should be an error, but some errors may be demoted to warnings under certain circumstances.  I would have to see the file and the exact command you used to know exactly why this happened.

QuoteQ. is it possible to filter the specific warning and/or error messages in the syntax?

You can filter all tag values with the -api filter option, or filter the Warning tag when used with -p, but since there are often multiple warning tags the -p option probably isn't very useful.  There are always User-defined tags with which you can do just about anything you want with some effort.

QuoteI also noticed a related issue. When I validate files to a csv, I have not found a way to make the column expand and include all the listed warnings. If a file has 7 issues, only the initial seems to be listed in the column and cut off. Is there a way to also make the columns vertical?

Add -g4 to the command.

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