Use XMP sidecar for an image instead of metadata stored in file

Started by MOL, January 04, 2012, 12:39:04 PM

Previous topic - Next topic

MOL

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.

Phil Harvey

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

MOL

Hi Phil

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

Uwe