ExifTool Forum

ExifTool => Archives => Topic started by: Archive on May 12, 2010, 08:54:41 AM

Title: Copying or moving the value of one tag to another
Post by: Archive on May 12, 2010, 08:54:41 AM
[Originally posted by stoobie on 2009-10-14 13:05:48-07]

Code:
How would I do the following for a batch of pictures:

1. Copy (or move) the value of the EXIF 'Date Taken' tag to the IPTC 'Date Created' tag?
2. Copy the value of the IPTC 'Keywords' and the EXIF 'Date Taken' tags to the IPTC 'Description'
   tag?

What I'm trying to do is to use ExifTool in conjunction with Picasa to get the date the picture
was taken and the Picasa tags (which are the the IPTC Keyword values) to automatically
populate the photo caption in Picasa.
Title: Re: Copying or moving the value of one tag to another
Post by: Archive on May 12, 2010, 08:54:41 AM
[Originally posted by exiftool on 2009-10-14 13:34:56-07]

this command may do what you want:

exiftool "-iptc:datecreated<datetimeoriginal" "-iptc:timecreated<datetimeoriginal" "-iptc:description<$keywords $datetimeoriginal" DIR

where DIR is one or more file or directory names.
(note: use single quotes instead of double quotes if running
on Mac or Linux.)

- Phil
Title: Re: Copying or moving the value of one tag to another
Post by: Archive on May 12, 2010, 08:54:41 AM
[Originally posted by stoobie on 2009-10-15 06:29:58-07]

Code:
That helps. Here's what I wound up using:

exiftool "-iptc:datetimeoriginal<datecreated"  -d "%a, %b %d, %Y"
"-iptc:Caption-Abstract<$datetimeoriginal: $keywords" * -r

I found that "Caption-Abstract" is the tag that Picasa uses to define it's captions.

So entering that command line in my My Pictures folder searched through all My Pictures and
sub-directories and gave me Picasa captions with the following format:

Tue, Dec 11, 2007: John Smith, Jane Smith, June Smith, May Smith

So thanks to ExifTool and your help, I've got this little BKM for using Picasa 3.5
to add dates and names to my captions:

Prerequisites: The BKM below assumes that you have all your pictures in the current directory, and
that ExifTool is in your PATH.

In Picasa:

   1. Add name tags
   2. Add quick tags with the names you want to be in the captions.
   3. Apply those quick tags to the Name Albums for each person
         a. Click on the album.
         b. Click the Quick Tag button with the person's name.
            Now you have populated the IPTC "Keywords" field with the tags,
            meaning the names of the people.
   4. Enter the following command line (all on one line) in command window/shell:
      exiftool "-iptc:datetimeoriginal<datecreated"  -d "%a, %b %d, %Y" "-iptc:Caption-      
      Abstract<$datetimeoriginal: $keywords" * -r

Now all your pictures should have captions with the following format:
Tue, Dec 11, 2007: John Smith, Jane Smith, June Smith, May Smith

Tip: The Picasa tags/Picasa quick tags can be any text. I just chose to use people's names,
but you can use any text you want.
Title: Re: Copying or moving the value of one tag to another
Post by: Archive on May 12, 2010, 08:54:41 AM
[Originally posted by exiftool on 2009-10-15 10:32:48-07]

Great, glad it worked.  But in your forum post I don't think you mean

Code:
"-iptc:datetimeoriginal<datecreated"

because there is no such tag as IPTC:DateTimeOriginal.

And if you meant:

Code:
"-iptc:datecreated<datetimeoriginal"

there is still a problem because your -d option sets
DateTimeOriginal to a format which is incompatible for copying.
But if this is what you wanted to do, then we are in luck because
the latest release of exiftool (7.97) allows you to turn off the
print formatting on a per-tag basis by adding the '#' character
to the end of the tag name, like this:

Code:
"-iptc:datecreated<datetimeoriginal#"

- Phil