Main Menu

filter "known" tags

Started by AnnaK, September 25, 2012, 11:02:16 AM

Previous topic - Next topic

AnnaK

Hello,
Thank you for this great software.

I need to export some XMP data to txt file. I used this command:
exiftool -T -r -filename -Label c:\photos > out.txt

The result was like:

3220034_l.jpg   Approved
6081063_l.jpg   -
6607999_l.jpg   Second
7201644_l.jpg   -

But i need to export only files which have any label. Like that:

3220034_l.jpg   Approved
6607999_l.jpg   Second

Is it possible? Could you please help me to write commands?
Thanks a lot in advance!
Anna

Phil Harvey

Hi Anna,

Try adding -if "$label" to the command:

exiftool -T -r -filename -Label -if "$label" c:\photos > out.txt

- 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 ($).

AnnaK

It works! Thank you very much  :)