Page 1 of 1

Aborting on error

Posted: 2014-02-19T09:52:50-07:00
by Eatloaf
Hi,

Is there a way to prevent convert from writing an output file if it encounters such or any error?

I'm using the following to compress tiffs:

Code: Select all

find . -name "*.tif" -exec echo convert {} -compress ZIP {} \;
In the case of an error, such as

Code: Select all

convert: Cannot read TIFF header. `./image01.tif' @ error/tiff.c/TIFFErrors/561.
it still outputs a file of 0 bytes, effectively deleting the original tif.