ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: BogdanH on January 02, 2012, 03:57:48 AM

Title: if..else and -p possible in single execute command?
Post by: BogdanH on January 02, 2012, 03:57:48 AM
Hi Phil,

Command:
exiftool -p "ISO exist" -if "$exif:ISO" photo.jpg
-will write "ISO exist" if ISO tag is defined.

Now, I would also like to get message ("No ISO") in case ISO tag isn't defined. Something like:
exiftool -p ("ISO exist" -if "$exif:ISO") else "No ISO" photo.jpg
-if possible at all, it should be a "single execute" command.

Yes, I have probably asked similar question before... :-[

Bogdan
Title: Re: if..else and -p possible in single execute command?
Post by: Phil Harvey on January 02, 2012, 07:13:55 AM
Hi Bogdan,

Unfortunately there is no way to get exiftool to print something only if the condition fails.

- Phil
Title: Re: if..else and -p possible in single execute command?
Post by: BogdanH on January 02, 2012, 11:30:16 AM
Hi Phil,
Thanks for answer -at least now I'm sure it can't be done. But I have found solution (for GUI needs) inbetween, so everything is fine.

Bogdan