Export (recursive) tags to tab-delim file (Windows)

Started by mwra, May 22, 2011, 01:08:32 PM

Previous topic - Next topic

mwra

Spinning my wheels.  Need to use the self-contained Win EXE as not allowed further install integration.  Need to read a (local) folderset and dump Filename and IPTC "Release Date" (IIM4 tag 30/542/0x021E). My command line knowledge is Mac based so Win BAT files are also a slight mystery. So far I've got

echo Filename[tab]Release Date > "C:\....path to folder with exiftool\export_list.txt"

I have my column heads. As for the rest I'm stumpt. I thikn I need something like:

exiftool -T -r ReleaseDate >> "C:\....path to folder with exiftool\export_list.txt"

But the exiftool(-k).exe is mainly telling me things like:

File not found: Release Date

The tag name seems correct as per (http://www.exiftool.org/TagNames/IPTC.html)

The documentation, over which I've worked for some hours, doesn't directly seem to cover this. Any pointers welcomed.

[edit - typo in topic title]

Phil Harvey

Close, but your command should be:

exiftool -T -r -filename -releasedate DIR >> "c:\...\export_list.txt"

Where DIR is the name of the root directory containing the images.

Your command didn't work because tag names must begin with a dash on the command line.  Arguments not beginning with a dash are interpreted as file/directory names.  Also, you didn't provide the root directory name.

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

mwra

THANKS - really appreciate that. Works like a charm. Is there a limit to the size of folderset against which I can run that? I've about 14,000 records to process, but I could batch it if necessary. The server is new and won't have any other important tasks running at the time.

To help other learners, I note from this, that tag names are case-insensitive. This is something I didn't pick up from the documentation. For instance, the same IPTC Release Date tag (from the IIM4 spec) is found by all the following command line variants, of course with a suitable 'DIR' value added:

exiftool -T -r -filename -releasedate DIR >> "c:\...\export_list.txt"
exiftool -T -r -filename -ReleaseDate DIR >> "c:\...\export_list.txt"
exiftool -T -r -filename -IPTC:ReleaseDate DIR >> "c:\...\export_list.txt"
exiftool -T -r -filename -1IPTC:ReleaseDate DIR >> "c:\...\export_list.txt"

The latter two variants help tie down the parent tag group. I can see this as useful if a tag occurs in more than one group.

exiftool -k -listg   gives a list of all major groups
exiftool -k -listg1   gives a list of all major groups' subgroups - i.e the CL names for things like the sub groups within XMP

Thanks for a great utility!

[edit for small typo]


Phil Harvey

You're welcome. :)

There is no limit to the number of files you can process.

The first sentence in the OPTIONS section of the exiftool documentation:

"Case is not significant for any command-line option (including tag and group names), except for single-character options when the corresponding upper-case option exists."

...but I guess this is easy to miss.

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

mwra

Oops. I sense the frustration in your closing point, but it is easy to miss.  A browser page find for "case" or "sensitiv" failed to match the key text that you quote. Plus, if you're looking for a comment under the heading case sensitivity, it's not to be found! As tags use the same '-' prefix as options and (some) tags clearly have differing upper and lowercase meanings, it's more likely one would assume tags are case-sensitive, though I'd agree it doesn't matter in practice ... except when an inscrutable command line won't work and case sensitivity seems like it might be a factor ... and you go to look for the documentation on 'case sensitivity'.

Writing documentation, as I do elsewhere, I have some sympathy.  It's a task that even if done right garners little thanks. So it remains only to thank you again for such a wonderful tool.

Phil Harvey

Quote from: mwra on May 23, 2011, 09:52:39 AM
I sense the frustration in your closing point, but it is easy to miss.

Not really frustration.  I'm happy that you actually read the documentation, but a bit disappointed maybe that you couldn't find the relevant section.  Often I mention things like this in various places to make them easier to find, but in this case I purpose use varying case in the EXAMPLES sections in the hope that people will realize this if they missed it in the documentation.

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

mwra

The problem isn't in writing comprehensive help, it's in figuring out how the dumb user will interact with it.  :)

I must have read the case-related stuff when first going through the main doc, but it didn't really register. Them, when I thought I had a case sensitivity problem, I missed it again because it wasn't in a section on Case Sensitivity. The weakness is in the questioner's (my) logic, not your docs. Of course, once shown the way in, the bits clicked into place. This something I recognise from sitting at the documentation writer's end - I've ceased to be amazed by the ways I fail to predict where people will enter the work and the way in which they read it.

BTW, in my initial research I did read the thread on the 'exiftool for dummies' and appreciate it's a great idea but hard task. The think I looked for first in the docs were 'hello world' example CLs of increasing complexity that would let me see how the parts go together. One thought, having sample test file(s) that all (or more likely most) examples could be run against might aid more self help. Though I'm too inexpert to write the key examples I'm happy to help drafting some of the surrounding structural copy.

Phil Harvey

Thanks for the offer.

The exiftool for dummies project is the back burner for a while until I get more time to spend on it.  Typically I like to spend my free time in the summer outside, so it will likely wait until fall before I get back to this again.

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