News:

2023-08-10 - ExifTool version 12.65 released

Main Menu

-X and -v

Started by pietro, December 07, 2022, 06:04:22 AM

Previous topic - Next topic

pietro

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

Phil Harvey

#1
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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).