Batch write filename to iptc field ?

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

Previous topic - Next topic

Archive

[Originally posted by voicelit on 2008-04-04 19:37:24-07]

It's not just how nice and smooth the tool and code works, but that it exists and how patient and quick your responses were. Just makes you a little happier about the world. Everything is not a dimwitted scam.
  I searched for so long -maybe a month and a half - for something to do what your tool does for me now. Not only did it seem unfindable, but some responses to my questions would smugly imply that this was silly request. Sure, eventually I found BREEZEBROWSER, which at least confirmed my belief that this must be a useful and desired tool. But BreezeBrowser was just a trial, and then they wanted _ I can't remember: a lot of money: $200 or $300.00. I got the impression there were a couple other apps that could also do this but they were systemicly incapable of making that clear or even didn't know they could.
  These companies, groups whatever seem way more concerned with emoticons and happy talk. Depressing.
       Well, I've got to figure some way to "donate. " I'll check your site.
Have any magazines or anything done a profile on you. I'm tellin' everybody about my experience with EXIFTOOL. Not computer people, just talkin' about things that are, say... like different than Home Depot " Hey Bob, we sell something called a 'hammer here ?"
    Great stuff , Phil... what a strange guy you must be.

Archive

[Originally posted by exiftool on 2008-04-04 21:53:30-07]

Hi Marty,

Thanks for your kind words.

The difference is that most other people do this for money,
but I do it for fun.  So I don't expect any donation, but I must
admit that I do sort of enjoy it when I receive one...  https://exiftool.org/forum/Smileys/default/smiley.gif" alt="Smiley" border="0" />

- Phil

Archive

[Originally posted by exiftool on 2008-04-05 11:18:05-07]

Sorry, I forgot to answer your question about the magazine
profile.  Buried deep in the
https://exiftool.org/index.html#links" target="_blank">Links
section of the exiftool home page you will find a link
to an article called
"http://www.schnebeck.de/an-interview-with-phil-harvey" target="_blank">An
interview with Phil Harvey".

- Phil

Archive

[Originally posted by arthurb on 2008-04-08 18:50:12-07]

Hello,
      writing the filename into an IPTC tag was exactly what I wanted to do, but I found this thread very confusing.  In particular I found the discussion about shortcuts quite difficult to follow, but then again others may well find the use of the Command Line interface difficult.  Because of all this, and because now that I can do what I want quite easily (I did pick some things up from this thread), I will put in here a description of what I do, in the hope that someone else might find it helps them.   Certainly, setting the filename into the IPTC ObjectName is very, very useful in my opinion, and was, I am sure, the original purpose for that field.  I am very unsure about Adobe's current usage however, but that is another topic.

Here is the little mini-tutorial...
ExifTool must be used from within a Windows XP Command Window (aka as a 'Command Prompt').  To open one: Click on 'Start', click on 'All Programs', click on 'Accessories' and then click on 'Command Prompt'.

 

This will open with the 'current directory (folder)' active, which can be changed using the 'cd' command, but that is not necessary if you fully specify the folders as shown in the examples below (ie the directories to be used for the program and the target image file are explicitly defined).  

Note that the first string in each command (in double quotes), which specifies the program to be used (ie ExifTool), will be dependent upon the folder structure on the PC being used, and thus where 'ExifTool' is stored on the disk.

PLEASE NOTE: In the Commands below the 'less than' character (ie Shift + ,) has been replaced by "+" (a plus sign) to try and get the forum software to accept my post.

 
=============================================================================================

                 

1. This will update the IPTC tag 'ObjectName' with the filename, including its extension, of the image file specified at the end of the command (ie in this case #_1.jpg):

"C:\Program Files\ExifTool_GUI\ExifTool" "-IPTC:ObjectName+filename" C:\Photos\testa\#_1.jpg"

 
----------------------------------------------------------------------------

 2. This will update the same tag as above in the same way, but will do it for all .jpg files in the target directory given as the last string (in double quotes) in the command (ie "C:\Photos\testa").

 

"C:\Program Files\ExifTool_GUI\ExifTool" "-IPTC:ObjectName+filename" -ext .jpg "C:\Photos\testa"

=================================================================================

PLEASE NOTE AGAIN: Replace + in commands above with 'less than' (Shift + ,) END OF NOTE.

 
When ExifTool finishes, it will tell you if it has updated the file, or, if you have specified a complete directory, it will say it has scanned it and how many files it has updated.  I believe you can tell ExifTool to scan sub-directories (which would involve a recursive execution of its code) by specifying the -r tag, but I have not used this and I do not therefore know how to use it.  It is documented though.

I have to say that ExifTool, especially when used with ExifTool_GUI, is an incredibly useful, and for me essential, tool when dealing with image metadata.  Thank you Phil, excellent work.

I thought I would do something helpful, and simple of course, here, but the forum software is so awful that I wish I hadn't bothered! Why is there no formatting, and why can't you use all of the keyboard characters (this is a real pain when describing ExifTool Commands) - I have no problems with any other forums, and I use lots of them - only this one is bad - why?

Archive

[Originally posted by exiftool on 2008-04-09 12:25:11-07]

Thanks for the tutorial.  I admit this forum sucks, but it saves
me having to host a forum myself.  To insert special
symbols like < and > you need to escape them in html
(ie. "<" and "&gt"), or place them within a
Code:
...
block.

Here are your instructions reformatted a bit:

------------------------------------------------

ExifTool must be used from within a Windows XP Command
Window (aka as a 'Command Prompt'). To open one: Click on
'Start', click on 'All Programs', click on 'Accessories' and then
click on 'Command Prompt'.

This will open with the 'current directory (folder)' active, which
can be changed using the 'cd' command, but that is not necessary
if you fully specify the folders as shown in the examples below (ie
the directories to be used for the program and the target image file
are explicitly defined).

Note that the first string in each command (in double quotes), which
specifies the program to be used (ie ExifTool), will be dependent
upon the folder structure on the PC being used, and thus where
'ExifTool' is stored on the disk.

1. This will update the IPTC tag 'ObjectName' with the filename,
including its extension, of the image file specified at the end of
the command (ie in this case #_1.jpg):

"C:\Program Files\ExifTool_GUI\ExifTool" "-IPTC:ObjectName<filename"
C:\Photos\testa\#_1.jpg"


------------------------------------------------

2. This will update the same tag as above in the same way, but will do it for all .jpg files in the target directory given as the last string (in double quotes) in the command (ie "C:\Photos\testa").

"C:\Program Files\ExifTool_GUI\ExifTool" "-IPTC:ObjectName<filename"
-ext .jpg "C:\Photos\testa"


When ExifTool finishes, it will tell you if it has updated the file, or, if
you have specified a complete directory, it will say it has scanned it
and how many files it has updated. I believe you can tell ExifTool to
scan sub-directories (which would involve a recursive execution of
its code) by specifying the -r tag, but I have not used this and I do
not therefore know how to use it. It is documented though.

Archive

[Originally posted by arthurb on 2008-04-09 13:16:35-07]

Thanks for that Phil (I take it ExifTool is you?), and I'm sorry I was a bit grumpy when I made my post yesterday; hadn't eaten all day, wife had just come home and I was cooking the evening meal (or should have been), and I thought the posting would take 5 minutes... 25 mins later I was getting annoyed.  Could the 'Posting Rules' be expanded somewhat; perhaps as a Help panel?

There is a typo in my post: in example 1. there should be a double quote at the start of the last string containing the target filename and path (ie "C:\Photo...).  I have not tried to edit it as I assume I cannot, although I am unsure of what I may be able to do here.

Archive

[Originally posted by exiftool on 2008-04-09 14:23:39-07]

Yes it's me, Phil. https://exiftool.org/forum/Smileys/default/smiley.gif" alt="Smiley" border="0" />

Don't worry about getting grumpy, this forum really does suck.
It is just a general CPAN forum, and isn't specific to exiftool,
so I don't have control over things like the posting rules.
And there is no editing feature.