Saving to .xml

Started by philbond87, August 04, 2021, 11:31:45 PM

Previous topic - Next topic

philbond87

If I want to save metadata to an XML file is there a way to do it by just saving tags to a file, eg.
exiftool -creator='John Doe' -creatorCity='Anytown' -usageRights='some rights' -X > Dir/someFile.xml

or can I only do it by saving the tags from an existing file as an xml file? eg.

exiftool -X somefile.jpg > file.xml

Thanks

Phil Harvey

XML isn't a writable format, so your idea won't work.  But it will work with XMP, which is probably what you want anyway.

exiftool -creator='John Doe' -creatorCity='Anytown' -usageRights='some rights' Dir/someFile.xmp

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