ExifTool Forum

General => Metadata => Topic started by: flognk on February 25, 2017, 01:56:08 PM

Title: Copy and modify metadata
Post by: flognk on February 25, 2017, 01:56:08 PM
Dear ExifTool-Pro's

I'm a newbie and have three cases wich I try to solve. I would really appreciate if somebody could give me some hints:

1. I would like to copy IPTC:Caption-Abstract, delete all nummerical values in it and then copy the text-value to IPTC:Keywords
For Example: IPTC:Caption-Abstract includes "2001, John Doe, ZIP City; 35870, Brother of John, ZIP City;" and in IPTC:Keywords I would like to have: "John Doe, Zip City; Brother of John, Zip City;

2. I would like to delete all nummerical values out of IPTC:Keywords

3. I would like ot replace all ; with a , in IPTC:Keywords

Thank you very much for your support.
Title: Re: Copy and modify metadata
Post by: Phil Harvey on February 25, 2017, 08:04:44 PM
Try this:

exiftool "-keywords<${caption-abstract;s/ ?\d+, ?//g;tr/;/,/}" -sep ", " DIR

The keywords are stored separately in the file, so in your example you will get these keywords:

1. John Doe
2. ZIP City
3. Brother of John
4. ZIP City

Drop the ;tr/;/,/ from the command and use -sep "; " if you wanted this:

1. John Doe, ZIP City
2. Brother of John, ZIP City

- Phil