Main Menu

Ignore Errors

Started by Guzman, April 10, 2015, 05:42:20 AM

Previous topic - Next topic

Guzman

Hello,

-m  (-ignoreMinorErrors) Ignore minor errors and warnings

How I can do so that errors are not displayed?

Thanks.

Phil Harvey

Use -q -q to hide all errors (and all other messages).

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

Guzman

Error messages are still displayed

C:\Users\Documents>exiftool -ImageWidth -q -if "$ImageWidth < 256" -ext jpg -ext png .
Image Width                     : 16
Error: File format error - ./out.jpg
Error: File format error - ./output_previewpath.jpg
Error: File format error - ./pp.jpg


Phil Harvey

notice that I used -q twice.

Hmmm.  But you are right, two -q's only suppresses warnings.  Errors may not be suppressed:

-q (-quiet)
            Quiet processing.  One -q suppresses normal informational
            messages, and a second -q suppresses warnings as well.  Error
            messages can not be suppressed, although minor errors may be
            downgraded to warnings with the -m option, which may then be
            suppressed with "-q -q".


So try this instead:

exiftool -ImageWidth -if "$ImageWidth < 256" -ext jpg -ext png . 2>/dev/null

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

Guzman

Error messages are still displayed

C:\Users\Documents>exiftool -ImageWidth -if "$ImageWidth < 256" -ext jpg -ext png . 2>C:\tmp\basura.txt
======== ./copy.png
Image Width                     : 16
======== ./out.jpg
======== ./output_previewpath.jpg
======== ./pp.jpg
    1 directories scanned
    3 files failed condition
    4 image files read

C:\Users\Documents>more C:\tmp\basura.txt
Error: File format error - ./out.jpg
Error: File format error - ./output_previewpath.jpg
Error: File format error - ./pp.jpg