Export Metadata from CR2 to xmp

Started by ChrisJH, October 04, 2020, 10:24:38 AM

Previous topic - Next topic

ChrisJH

I am trying to create xmp sidecar files from CR2 files. The command I am using is

exiftool -ext cr2 -tagsfromfile @ -srcfile %d%f.xmp -all:all   .

I get the error that there is nothing to write and files are not created.
I know there are no XMP tags in the CR2 file but I thought the
-all:all
should deal with that
Any suggestions please

Chris




StarGeek

All:All copies tags to the exact same locations in the exact same groups.  If there are no XMP tags in the source, then no XMP tags will be copied.  EXIF and IPTC tags will only be copied to the same group, which won't exist in an XMP sidecar, so none of these will get copied.

You could use just All which will copy tags with the same name but won't do any translation between similar tags with different names. So, as an example, EXIF:ImageDescription or IPTC:Caption-Abstract will not get copied to XMP:Description.

To copy the most data, you'll want to use the exif2xmp.args and iptc2xmp.args files (see Metadata Sidecar Files example #5).  You can get them from the full archive on the main page or download them from Github.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

ChrisJH

Many thanks for that. It is what I wanted. Works fine for single files  but I cannot work our the syntax to make it work on all CR2 files in a folder.
Can you point me to somewhere that explains how the batch syntax works.
I have done many searches but without success

Chris

Phil Harvey

Hi Chris,

See examples 11 through 17 on the page that StarGeek gave.  All of the details are found in the -tagsfromfile section of the application documentation.

- 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 ($).