writing all metadata to an xmp packet in same file

Started by graemeNPS, November 23, 2011, 05:38:17 PM

Previous topic - Next topic

graemeNPS

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

Phil Harvey

#1
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), and that you type the command in the window that pops up when you run cmd.exe.
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

graemeNPS

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

Phil Harvey

#3
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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

graemeNPS