generate a txt file with file name and keywords

Started by sniper_, August 26, 2012, 10:51:36 AM

Previous topic - Next topic

sniper_

Hi all,

I have photos with keywords (Iptc corresponding to XMP) in one folder. Could anybody help me write a command to generate a txt file in format:
filename1 keyword1, keyword2,...
filename2 keyword1, keyword2,...

Thanks.

Phil Harvey

Something like this may do it:

exiftool -csv -keywords DIR > out.txt

(where DIR is the name of a directory containing the images)

...but that will add a comma after the file name.  This is another alternative where you can specify the format exactly:

exiftool -p "$filename $keywords" DIR

But for both commands I am not sure if you want the IPTC Keywords, or the corresponding XMP tag (Subject) instead.

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