Best way to copy metadata from a bunch of files?

Started by Archive, May 12, 2010, 08:54:25 AM

Previous topic - Next topic

Archive

[Originally posted by eric80 on 2008-09-30 21:56:37-07]

Thank you very much for the ExifTool: it is very great to be able to manage so many metadata for our pictures files. I whish every photo software would do so...
I am using a Canon DSLR, and like to keep the exif metadata and only some maker notes (mainly the lens used and the AF points which can be seen in ZoomBrowser/ImageBrowser)
But currently, almost every RAW converter I've tried are skipping these data.
Therefore, I am looking for a solution to restore the exif/maker notes from the original files to the reworked ones. I think exifTool will be a great help to do so.
I am thinking about writing a small WinApp (I am more comfortable working with .NET) which will take a source directory and a destination directory and look for all files (by their names) and copy the metadata. e.g. the file "img_455.tif" and img_455.jpg" in the destination directory will get the metadata from the file "img_455.cr2" located in the source directory.

What would be the best way to use ExifTool for that?
I am reading the help documentation (exiftool > manual.txt helps Wink), and I see the -TagsFromFile which I may use. There is also a lot of possibilities to parse file and directories: will it be even possible to do what I want in a single command?

Otherwise, dealing with the library "directly" will be surely better than calling the binary. Could I do so via .NET? I've seen in other thread here people asking about a DLL wrapper. Wrapping the ExifTool into a .NET assembly could be a solution. The "Perl Dev Kit" of ActiveState claims being able to do so, but unfortunately, it is not free...

Archive

[Originally posted by exiftool on 2008-10-01 18:04:28-07]

Yes, you can do this in a single command:

Code:
exiftool -tagsfromfile SRCDIR/%f.tif DSTDIR -ext jpg

The above command will transfer all information to the
preferred groups in the destination JPEG.  You can add more
arguments if you want to specify exactly what you want
to copy, and where you want it to go.

See the COPYING EXAMPLES section in the application
documentation for a bunch of examples like this.  One of these
examples is very similar to what I have done here.

- Phil

Archive

[Originally posted by eric80 on 2008-10-12 20:04:55-07]

Thank you, the command works pretty well (for both jpg & tiff).
However, it is "too much": I'd like to tune it to only copy some tags from the MakerNotes.

In the help, I read "The maker note information is copied as a block, so it isn't affected like other information by subsequent tag assignments on the command line."
Does it mean it is not possible to copy only some tags from the MakerNotes.

I've tried your given command with the "-Lens" tag, and seen that the Lens tag is copied from the source makernote to the destination "XMP". Any possibility to copy it at MakerNote?

Archive

[Originally posted by exiftool on 2008-10-12 21:23:32-07]

Unfortunately, you can't create makernote
tags individually because the proprietary
structure of the makernotes must be maintained,
which means writing all or nothing.  To write
individual tags, it is usually best to write
them to XMP as you were doing with the Lens tag.

See the "COPYING EXAMPLES" section in the application
documentation for examples on how to copy tags
individually and rename them, etc.

- Phil

Archive

[Originally posted by eric80 on 2008-10-13 21:23:38-07]

ok, I suppose that not all software respect this makernote structure, e.g. picassa erases some makernotes, but not all!
Anyway, your approach seems to be better: my question was more "how can I copy only the makernotes"?
I am reading the examples, but do not find the explicit switch for the complete makernote stucture.

Archive

[Originally posted by exiftool on 2008-10-13 22:19:25-07]

I think FAQ
number 8
should explain things for you.

- Phil