How to move xmp data from a dng file back to the original raw file

Started by Louie Sherwin, April 29, 2010, 10:47:56 PM

Previous topic - Next topic

Louie Sherwin

I think that the answer is pretty simple but I noticed some discrepancies and wanted to ask about this first. The dng files and the raw files all have the same base file name but are in different directories. When I run the following I get what look the correct .xmp files from each dng file

exiftool -o %d%f.xmp dng_directory

However, if I examine each file by running the following commands in side by side windows the results are slightly different.

exiftool -xmp:all -s -G1 sherwin_20081210_0023.dng | sort
exiftool -xmp:all -s -G1 sherwin_20081210_0023.xmp | sort

Can you explain?

I have attached the output of each of above commands.

tks, louie
MacOS 10.5.8, IIP 3, Lightroom 3b2, Photoshop CS4

Phil Harvey

Hi Louie,

Your command uses the same technique as the -tagsFromFile option to transfer information to the XMP file.

Quote from: -TagsFromFile Documentation
            By default, this option will commute information between same‐
            named tags in different groups and write each tag to the preferred
            group.  This allows some information to be automatically
            translated when copying between images of different formats.
            However, if a group name is specified for a tag then the
            information is written to the original group (unless redirected to
            another group, see below).  This works even if "All" is used as a
            group name, so "−All:All" is used to specify that all information
            be copied to the same group in the destination file.

To copy all writable tags from XMP to XMP, add -all:all after the -o option.  Alternatively you can copy the exact XMP record by adding -xmp after -o -- this will also include any tags which are not writable by ExifTool as well as any padding which ExifTool doesn't normally add to XMP files.

- Phil

[edit] I should have mentioned that it would be more efficient to use -xmp:all instead of -all:all above.  -xmp:all will have the same effect since only XMP is written to an XMP file anyway, but it won't try to copy tags which can't be written to the XMP file.
...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 ($).

Louie Sherwin

Hi Phil,

Thanks for the additional information. After testing I determined that using the -xmp option is the one I need. This was the only option that extracted my ACR snapshots.

tks, louie
MacOS 10.5.8, IIP 3, Lightroom 3b2, Photoshop CS4