I want to be able to export an image file's metadata to a sidecar XMP file that is named after the image file but with an .xmp extension. For proprietary raw files, that's the default. For DNG files, I can tediously force it by locking the file, loading it into Camera Raw, and selecting the "Export Settings to XMP" function. However I want to do this for several hundred or some thousand image files at once—so loading them all into Camera Raw just to make it export the metadata is not really a feasible method.
Worse yet, for JPEG files exporting the metadata to a sidecar file is not possible at all, as far as I can tell. When the JPEG file is writable then the exported XMP metadata will go into the file itself. When the JPEG file is write-protected then Camera Raw will entirely refuse to export the XMP metadata. This behaviour is inconsistent with other file types, as Camera Raw will happily export the XMP metadata to sidecar files for write-protected DNG files. By the way, there is another inconsistency between write-protected DNG files and proprietary raw image files, as Camera Raw will export XMP metadata for both into sidecar files but Bridge will export XMP metadata to sidecar files only for proprietary raw image files but not for write-protected DNG files. That doesn't make sense.
If an image file is write-protected then any changes to the metadata must go into sidecar files—as simple as that. Why are proprietary raw image files, write-protected DNG files, and write-protected JPEG files behaving differently in this respect? Sidecar files are fully supported for proprietary raw files, half-way supoorted for DNG files, and not supported at all for JPEG files.
Anyway—I need a way to select an arbitrary number of image files of any kind (in Bridge, not in Camera Raw) and then export all their metadata to sidecar files, one sidecar file for each image file, at the push of a button. It would be nice if I weren't forced to tamper with file locking first, just create those damn sidecar files when I'm asking for them. I'd even be happy with a createMetadataTemplate() or saveMetadataToSidecar() function in Bridge's scripting interface. There, I found a function to load a thumbnail's metadata from a metadata template (i. e. an XMP file; see applyMetadataTemplate() function)—but no way to save a thumbnail's complete metadata to a metadata template. If there is a way then please tell me. If there is no way yet then please provide one as soon as possible!