ExifTool Forum

ExifTool => Newbies => Topic started by: pietro on December 07, 2022, 06:04:22 AM

Title: -X and -v
Post by: pietro on December 07, 2022, 06:04:22 AM
Dear all,

I noted a strange behaviour when trying to use -X and -v together. Perhaps I simply should not do that? I thought I would report it in any case.

In a bash script, if I do the following

exiftool -X -r -ext $sourcefileformat -w "$parent"/metadata/%f_%e.xml $parent

all goes well and for each file with the extension in the variable an XML file is written at the specified location.

I did however struggle a lot because I had this

exiftool -X -v -r -ext $sourcefileformat -w "$parent"/metadata/%f_%e.xml $parent

This resulted in the XML files saved to contain the metadata as text (not as RDF/XML), with just a final <rdf:RDF>
 tag.

all best
Title: Re: -X and -v
Post by: Phil Harvey on December 07, 2022, 07:13:46 AM
These are two very different output formats (the -v output is not XML format).  By default the -v option disables incompatible output formats, but if you really want both of them together add -all to your command.

Or if you want more details in XML format, read the -X option documentation to see what other options may used.  (They are  -b, -D, -H, -l, -s, -sep, -struct and -t.)

- Phil