ExifTool Forum

ExifTool => Newbies => Topic started by: sniper_ on August 26, 2012, 10:51:36 AM

Title: generate a txt file with file name and keywords
Post by: sniper_ on August 26, 2012, 10:51:36 AM
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.
Title: Re: generate a txt file with file name and keywords
Post by: Phil Harvey on August 26, 2012, 03:55:33 PM
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