ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: MOL on January 04, 2012, 12:39:04 PM

Title: Use XMP sidecar for an image instead of metadata stored in file
Post by: MOL on January 04, 2012, 12:39:04 PM
Just a quick question: is it possible for ExifTool to check whether there is an XMP sidecar associated with an image? I would like to retrieve the metadata from the sidecar instead of the image if an XMP file is available, and only get the data directly from the image if no sidecar for it is found.

Thanks
Uwe

PS: My apologies if this has been covered somewhere in the documentation, but I couldn't find it.
Title: Re: Use XMP sidecar for an image instead of metadata stored in file
Post by: Phil Harvey on January 04, 2012, 01:32:21 PM
Hi Uwe,

The application has no special logic for handling sidecar files.  If you want to extract metadata from a sidecar file, then you must specify this on the command line, which can be done something like this:

exiftool --ext xmp -srcfile %d%f.xmp DIR

But this will give a "File not found" error for image files without sidecar xmp's.

I can think of no way to have this fall back to reading the image file in the absence of an xmp without writing a dedicated script.

- Phil

Edit:  Oops, I miss-spelt your name.  Fixed.
Title: Re: Use XMP sidecar for an image instead of metadata stored in file
Post by: MOL on January 05, 2012, 12:49:57 PM
Hi Phil

Thanks a lot. I just wanted to make sure that I haven't overlooked anything.

Uwe