Limit output to applicable files

Started by StarGeek, August 01, 2011, 10:54:53 PM

Previous topic - Next topic

StarGeek


I've looked around but couldn't find an answer, so time to ask.

Is it possible to limit output to only the files that have the specific info I'm looking for? 

For example, if I have a directory with 1,000 files in it and one file has a comment in it, if I run ExifTool -comment on that directory, I'll get a line for each file in that directory even though most won't have a useful response. 
"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

Phil Harvey

You can use the -if option, like this:

exiftool -if '$comment' -comment DIR

(note: use single quotes as above on Mac/Linux, or double quotes around "$comment" in Windows)

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

Excellent.   Works great.  Thank you very much.
"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