Config file for unknown tags

Started by Archive, May 12, 2010, 08:54:26 AM

Previous topic - Next topic

Archive

[Originally posted by bogdan on 2008-10-12 08:08:16-07]

Hi Phil,

Scenario: I've used the folowing command:

Code:
exiftool -makernotes:all -U -s photo.CR2
-where I got (among a lot(!) of other things):

Code:
...
Canon_ShotInfo_0x0017 :20
...
Canon_CameraInfo450D_0x0008 :20
...

Now, I'd like to examine/compare only above two (unkown) tags. It seems such things can be done by using "config" file. I've "studied" your config example file, but I simply don't know how to adapt it for my needs.

What I would like to accomplish is something like:

Code:
set TagName of Canon_ShotInfo tag 0x0017 to name MyTagONE
set TagName of Canon_CameraInfo450D tag 0x00 to name MyTagTWO

..and then use exiftool as (something like):

Code:
exiftool -Makernotes:MyTagONE -Makernotes:MyTagTWO photo.CR2

Could you, please, give me "config" example which could do that?

If possible, can you make it that way, that one of above tags (just for example) can be written too?

And related question: does filename of ".ExifTool_config" matter? I mean: can I have two different config files inside working directory, like:

Canon.ExifTool_config

Nikon.ExifTool_config

-are both called when executing exiftool?

That's for now... thanks in advance.

Bogdan

Archive

[Originally posted by exiftool on 2008-10-12 11:42:20-07]

Hi Bogdan,

Here is your config file:

Code:
%Image::ExifTool::UserDefined = (
    'Image::ExifTool::Canon::ShotInfo' => {
        0x0017 => 'MyTagOne',
    },
    'Image::ExifTool::Canon::CameraInfo450D' => {
        0x0000 => 'MyTagTwo',
    },
);

The tags will be writable since tags in these tables are writable
by default.

Currently, exiftool only reads one config file, so all tags
must be added to the same file because exiftool only
looks for a file with the name ".ExifTool_config".

- Phil

Archive

[Originally posted by bogdan on 2008-10-12 18:44:32-07]

It seems to be so simple (and logical)... however, it doesn't work here.

I've copy/pasted your script and saved it as "test.ExifTool_config" into the same (working) directory, where image files are. Btw. I've made a typo for "MyTagTwo": it's tag number is 0x0008 -what I've corrected in your script.

Now, when executing:

exiftool -makernotes:MyTagOne photo.CR2

-I get none returned message from exiftool. If I execute (for example):

exiftool -makernotes:MyTagOne -makernotes:OwnerName photo.CR2

-I get only OwnerName value and nothing else listed.

Any idea? Thanks for patience...

Bogdan

Archive

[Originally posted by exiftool on 2008-10-12 21:16:11-07]

Hi Bogdan,

The file must be called ".ExifTool_config", not
"test.ExifTool_config".  I hope this is the only
problem, but check the FAQ for a few other hints
if you still have problems.

- Phil

Archive

[Originally posted by bogdan on 2008-10-13 04:20:48-07]

Hi Phil,

I've tried that before too, but when renaming, Windows insist on some name before dot. That is, I can only have:

something.ExifTool_config

or
ExifTool_config  -without dot.

Thus, I was thinking, with ".ExifTool_config" you've emphasized importance of suffix. I'll go thru FAQ later... Thanks.

Greetings,

Bogdan

Archive

[Originally posted by kailash on 2008-10-13 07:55:44-07]

Hi Bodgan,

I use WinXP Home Edition and the Windows Explorer does not allow renaming of file to filenames starting with a dot. However, the file can be renamed using the command prompt.

Start the command prompt:

"Start Menu -> Programs -> Accessories -> Command Prompt"

OR, type cmd on the "Start Menu -> Run window", and press enter.

Change directory to your exiftool directory and use the following command:

Code:
ren "temp.ExifTool_config" ".ExifTool_config"

Hope this helps.

- Kailash

Archive

[Originally posted by bogdan on 2008-10-13 15:31:09-07]

Thank you Kailash!

I'm quite familiar with "old DOS", but didn't know that "Command" allows that (while WinExplorer doesn't). And for such simple thing.... who would bother to read FAQ :-)

It may be of interest for others too: In Config example, there's explained (if I understood correctly), that ".ExifTool_config" file can be in "working" directory too (which I undersood as "current" directory). But that doesn't work: so I've placed config file into Windows directory -and now it WORKS :-)

Thanks again to both... best wishes,

Bogdan

Archive

[Originally posted by exiftool on 2008-10-13 22:13:36-07]

Hi Bogdan,

Glad you got it working.  ExifTool looks in the exiftool application
directory and your HOME directory,
and only defaults to the current directory if the HOME directory
can not be determined.  Usually, on Windows your HOME directory
is c:\Documents and Settings\USER, but this depends on your
environment settings.  You can also set the EXIFTOOL_HOME
environment variable to load the config file from wherever you
want (ie. I think the syntax on windows should be something
like "set EXIFTOOL_HOME some_directory", but don't quote me
on that).  But probably putting the config file in
the application directory as you have done is easiest.

- Phil