The DAM Forum
Welcome, Guest. Please login or register.
May 21, 2013, 01:09:54 AM

Login with username, password and session length
Search:     Advanced search
Jan 9, 2012
John Beardsworth's new Lightroom site
Lightroom Solutions
27960 Posts in 5113 Topics by 2914 Members
Latest Member: imthedamstar
* Home Help Search Login Register
+  The DAM Forum
|-+  Software Discussions
| |-+  Scripting
| | |-+  Batch-append IPTC keywords to filename? (win xp)
« previous next »
Pages: [1] Print
Author Topic: Batch-append IPTC keywords to filename? (win xp)  (Read 3676 times)
wprasek
Newbie
*
Posts: 14


View Profile
« on: June 20, 2007, 03:10:45 AM »

Hi everyone, I'm new to this group (just started keywording 20,000 images) and wondered if there is an easy way to batch-append IPTC keywords to image filenames?

Currently I batch-rename all new photos in this format: YYMMDD-HHMMSSx_wprasek.jpg. "x" is a sequence number required to ensure a unique file ID as I sometimes take multiple shots in the same second, while "-wprasek" represents my name/website, www.wprasek.com.

However these filenames give no clue to search engines as to what sort of content the image contains, and so they do not show up in image search results. To remedy this, I would like to append perhaps 4 or 5 keywords to the end of the filename.

Ideally I'd like to add IPTC keywords in iView (v3.12 PC) then somehow batch-append the first 4 or 5 keywords to the filename,
ending up with something like this:

070620-0928551-wprasek-berlin-alexanderplatz-tower-sunset.jpg

Does anyone know of a utility or script that can do this? I'd rather not enter keywords twice - once to IPTC then again manually to the filename.

Thanks for any help
Warren Prasek
www.wprasek.com

*** originally posted to iView forum before I realised this dedicated scripting forum existed ***
Logged
johnbeardy
Administrator
Hero Member
*****
Posts: 1813


View Profile WWW
« Reply #1 on: June 20, 2007, 03:50:44 AM »

Warren,

I think you are right about scripting being the solution but I don't think one has been written to do this. For one thing, what if you have lots of keywords? What about any limits on file name lengths on your host?

On Windows it's an easy enough script - you're essentially saying "item name = item name plus keywords (replacing the ; with -)". How's your scripting?

John
Logged
wprasek
Newbie
*
Posts: 14


View Profile
« Reply #2 on: June 21, 2007, 04:22:59 AM »

Heh, my scripting? Shocked Mmmmm. Never tried VB to be honest, though I am fairly competent with HTML, CSS, and basic PHP-javascript-actionscript so I guess I should give it a go. If so, where do I start? Can you recommend a good freeware VB IDE for a newbie?

And you're right, I'd have to use variable(s) to keep track of how many characters have been added, and stop when they reach a set number. Do i really have to limit my filename length to max. 31 chars? Not sure where I read that... and does that include or exclude the 4 chars for file extension? eg .jpg
Logged
wprasek
Newbie
*
Posts: 14


View Profile
« Reply #3 on: June 21, 2007, 04:24:42 AM »

Actually now that I think about it, PhotoMechanic has a batch-rename function which lets you insert IPTC keywords but I can't find a way of appending them to the existing filename (my YYMMDD-HHMMSSx-wprasek- prefix). Anyone familiar with PhotoMechanic in this area?

Logged
johnbeardy
Administrator
Hero Member
*****
Posts: 1813


View Profile WWW
« Reply #4 on: June 21, 2007, 05:02:34 AM »

If you can handle PHP, you can hack VBS. http://www.beardsworth.co.uk/iview.php has an iView script called "Rename - first letter capital" which would be a good start - ivItem.annotations.keywords gets you the keywords.

As for an IDE, use Windows Notepad. Alternatively, I develop most of my scripts in Excel's VBA window - much easier for stepping through and checking variable values - and then port them to Niotepad and VBS.

Can't help with PM. The script's advantage is that it might include logic that prevents long filename problems and might exclude certain keywords (eg "ugly").

John

Logged
wprasek
Newbie
*
Posts: 14


View Profile
« Reply #5 on: June 21, 2007, 09:08:57 AM »

OK, i guess i'll give it a shot. thanks for your advice John, much appreciated
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!