Main Menu

Compound if statement?

Started by camner, February 08, 2017, 02:41:18 PM

Previous topic - Next topic

camner

I'd like to perform a certain command on only those files within a directory that meet two conditions (specific camera model and .mov files).  Is there a way to do that?  All the examples I could find only have a single condition specified.

StarGeek

Yes, you can use Perl syntax in the if argument.  The easiest options are to use and, or, and not.  If you want to get more complex, you can search for Perl tutorials.

Also, the best way to limit your command to just one type of file is to use the -ext option.  In this case, use -ext mov to only process .mov files.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

camner

Again, thanks for the quick reply.  The use of the -ext flag plus a simple -if will work for me this time, but I'll look into the Perl syntax if I need something more complex in the future.