ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: ChrisJH on October 04, 2020, 10:24:38 AM

Title: Export Metadata from CR2 to xmp
Post by: ChrisJH on October 04, 2020, 10:24:38 AM
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



Title: Re: Export Metadata from CR2 to xmp
Post by: StarGeek on October 04, 2020, 10:58:46 AM
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 (https://exiftool.org/metafiles.html#EX5)).  You can get them from the full archive on the main page or download them from Github (https://github.com/exiftool/exiftool/tree/master/arg_files).
Title: Re: Export Metadata from CR2 to xmp
Post by: ChrisJH on October 10, 2020, 05:12:47 AM
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
Title: Re: Export Metadata from CR2 to xmp
Post by: Phil Harvey on October 10, 2020, 07:33:28 AM
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 (https://exiftool.org/exiftool_pod.html).

- Phil