Help needed to structure geografical information from dng and jpg files

Started by ULSWK, June 13, 2012, 05:01:31 AM

Previous topic - Next topic

ULSWK

Hi all,
I need help, because I'm not familiar enough with the exiftool syntax.

I have two kind of files. DNG Files and JPG Files. Both mixed in a really hugh directory structure.
All files have geografical information in the XMP section. (Fields: Country, State, City, Location).
I can see these information with the exiftoolGUI there.
Perhaps less than 1% of the files don't have these information, I don't care about them.

All these fields have been imported into the lightroom keywords section (while importing the fotos), but currently they are not hirarchical structured.
So, England is side by side with Everglades....
Because there are now several thousand keywords, I have to structure them and it's too much to oversee it manually.

My idee is to export all the (above named) fields into a textfile, structure them external (remove duplicated, etc.), build a useful structure and import that (then hirarchical) keyword structure into lightroom.

Now I need help how to export these four fileds from all dng and jpg files from the directory structure into one (or only a few) comma or tab delimited textfiles.
I'm sure this is not so complicated, but I didn't manage it.

Can anybody help ?

Thanks' in advance
Ulrich

Phil Harvey

Hi Ulrich,

First you need to determine the ExifTool tag names for the information you want to export.  Use this command to extract information with tag names:

exiftool -G -a -s FILE

Then, use this command to export a list of tags from all files in a directory to a CSV output file:

exiftool -csv -TAG1 -TAG2 -TAG3 ... -r DIR > out.csv

Where DIR is the name of your directory, and -TAG1 etc are the tag names, possibly prefixed by the group name (ie. -XMP:Country).

Have fun!

- Phil

Edit: removed space in output csv file name
...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 ($).

ULSWK

Hi Phil,

your tool does a perfect job !
Thank you for exiftool and for your advice.

Ulrich