ExifTool Forum

ExifTool => Developers => Topic started by: Guzman on April 10, 2015, 05:42:20 AM

Title: Ignore Errors
Post by: Guzman on April 10, 2015, 05:42:20 AM
Hello,

-m  (-ignoreMinorErrors) Ignore minor errors and warnings

How I can do so that errors are not displayed?

Thanks.
Title: Re: Ignore Errors
Post by: Phil Harvey on April 10, 2015, 06:47:05 AM
Use -q -q to hide all errors (and all other messages).

- Phil
Title: Re: Ignore Errors
Post by: Guzman on April 10, 2015, 07:26:36 AM
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

Title: Re: Ignore Errors
Post by: Phil Harvey on April 10, 2015, 07:27:14 AM
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
Title: Re: Ignore Errors
Post by: Guzman on April 13, 2015, 05:50:00 AM
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