conditional rename of files using -if statement

Started by davkamer, September 02, 2019, 07:20:20 PM

Previous topic - Next topic

davkamer

Hello,

Running exiftool version 11.65 on MacOS 10.14.5

I'm trying to rename all .avi files recursively using the following:

exiftool -if '$FileTypeExtension eq "avi"' '-filename<${CreateDate}_${Make}_${Model}.%e' -d %Y-%m-%d_%H%M%S -r /DIR/

this returns "files failed condition" and doesn't rename anything, but if I specify the file it works. I have confirmed that the avi files do have the CreateDate, Make and Model tags.

I've been searching the forum here but have not found any leads to get this working.
Any help would be very appreciated. 

StarGeek

"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

davkamer

Thank you for the quick reply, it worked as expected!