Export metadata from multiple images/formats to multiple JSON files

Started by mazeckenrode, June 05, 2020, 07:07:20 PM

Previous topic - Next topic

mazeckenrode

Ok, I think I've done this before (at least for multiple image files of a single format), but it's been a while and, unfortunately, I either failed to make myself a note of how it was done, or can't find it. I want to export all *writeable* metadata from all images of whatever format (typically with extensions JPG, JPEG and PNG) to separate JSON files, one per image, in such a way that the JSON metadata can be imported from. The best I've come up with, based on information from several posts here and at Stack Overflow, is this:

exiftool -w %f.%e.json -json -struct -G

...but that just gives me the help output text. Any pointers?

StarGeek

A file or directory to process?  When I run your command and add a file name or directory, I ended up with a json file for each image file.

Use a dot . to process the current directory.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

mazeckenrode

@StarGeek

Doh(t)! That's what I was missing! Thanks much!

Also wanted to limit it to exporting only EXIF/IPTC/XMP metadata, so settled on the following, which seems to do what I want:

exiftool -w %f.%e.json -json -struct -G -XMP:All -EXIF:All -IPTC:All .