ExifTool Forum

ExifTool => Newbies => Topic started by: graemeNPS on November 23, 2011, 05:38:17 PM

Title: writing all metadata to an xmp packet in same file
Post by: graemeNPS on November 23, 2011, 05:38:17 PM
I am very new to exiftool.

I am trying to collect all the metadata from each jpg file in a directory, and write it back to the same file as xmp metadata for later processing in an xmp tool.  Reading the docs, it seems like it should work, but I am not sure how.
I am using the windows exe.
Please advise.

Thanks,
graeme
Title: Re: writing all metadata to an xmp packet in same file
Post by: Phil Harvey on November 23, 2011, 06:43:15 PM
Hi Graeme,

Do you just want to copy the metadata from a JPEG to an XMP file, or do you want to store it somewhere in between?

Creating XMP files from JPEG's could be done like this:

exiftool -o %d%f.xmp -ext jpg c:\images

- Phil

Edit:  I should have mentioned that you must first install exiftool for command-line use (see the installation instructions (https://exiftool.org/install.html)), and that you type the command in the window that pops up when you run cmd.exe.
Title: Re: writing all metadata to an xmp packet in same file
Post by: graemeNPS on November 24, 2011, 09:15:48 AM
The jpgs are quite old and do not have xmp packets, so I am hoping that exiftool will gather all the metadata to xmp, and then insert the xmp packet into the jpgs.  If that requires a copy to be made of the jpgs, that is fine.

graeme
Title: Re: writing all metadata to an xmp packet in same file
Post by: Phil Harvey on November 24, 2011, 11:27:15 AM
Thanks, I understand now.  The basic command could look like this:

exiftool "-all>xmp:all" -ext jpg c:\images

This will copy same-named tags to XMP in each JPG file.  There is, however, some extra information that you may want copied.  The ".args" files in the full perl distribution contain the arguments necessary to do some standard conversions.  Using these, a command like this would give a more complete conversion of the metadata to XMP:

exiftool -@ exif2xmp.args -@ iptc2xmp.args -ext jpg c:\images

- Phil
Title: Re: writing all metadata to an xmp packet in same file
Post by: graemeNPS on November 24, 2011, 02:45:42 PM
thanks, Phil, that works like a charm.

graeme