ExifTool Forum

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

Title: Copy tags from dir
Post by: Archive on May 12, 2010, 08:54:36 AM
[Originally posted by mitziplicky on 2009-05-31 19:47:24-07]

I have dir1 with original files and dir2 with a resized copy of them and without relevant tags
How can I copy tags from the files in dir1 to the same named files in dir2?
Thanks in advance
Title: Re: Copy tags from dir
Post by: Archive on May 12, 2010, 08:54:36 AM
[Originally posted by exiftool on 2009-06-01 11:08:01-07]

This command should do what you want:

Code:
exiftool -tagsfromfile dir1/%f.%e -all:all dir2

- Phil
Title: Re: Copy tags from dir
Post by: Archive on May 12, 2010, 08:54:36 AM
[Originally posted by mitziplicky on 2009-06-01 22:07:32-07]

Thank you!
I have another question.
Same case as above but I want to 'Description' from the original to be assigned as 'Headline' in the copy.
Thanks
Title: Re: Copy tags from dir
Post by: Archive on May 12, 2010, 08:54:36 AM
[Originally posted by exiftool on 2009-06-02 11:19:05-07]

Add "-description<headline" (in quotes) after -all:all

- Phil
Title: Re: Copy tags from dir
Post by: Archive on May 12, 2010, 08:54:36 AM
[Originally posted by mitziplicky on 2009-06-02 19:17:45-07]

Hello Phil.

Is this in that order?

exiftool -TagsFromFile /path/to/source/%f.%e -DateTimeOriginal -CreateDate "-Headline<Description" -Keywords /path/to/target

Source and target dirs have the same filenames.  

Files in source dir have complete metadata info. Files in dest dir have none.

I only want to copy DateTimeOriginal, CreateDate, Keywords, and fill Headline with Description content from source.  Description in target must be empty.

Thank you.
Title: Re: Copy tags from dir
Post by: Archive on May 12, 2010, 08:54:36 AM
[Originally posted by exiftool on 2009-06-02 22:23:29-07]

For your command, the order doesn't matter as long as
the tags you specify come after -TagsFromFile.

Order matters if you use -all:all though, because an existing
Headline in the file would override the Headline you wrote
with "-headline<description" if -all:all came afterwards.

In general, order only matters if you write the same tag
with different values in different arguments.

- Phil
Title: Re: Copy tags from dir
Post by: Archive on May 12, 2010, 08:54:36 AM
[Originally posted by mitziplicky on 2009-06-03 23:49:30-07]

What happens if there's no target file with the same name as a source one?
Thank you
Title: Re: Copy tags from dir
Post by: Archive on May 12, 2010, 08:54:36 AM
[Originally posted by exiftool on 2009-06-04 10:57:02-07]

The command iterates over existing target files.

- Phil