Author Topic: Filenames to keywords  (Read 8873 times)

Offline Icepick

  • Newcomer
  • *
  • Posts: 2
    • View Profile
Filenames to keywords
« on: April 13, 2009, 06:12:44 PM »
I have over 1000 images with various file names such as "090220-01 Smith" or "090101-35 Jones" and I need to copy the "name" into the keyword field so they can be searched in my photoshelter archive. Is this possible as a batch action?

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Filenames to keywords
« Reply #1 on: April 13, 2009, 06:24:43 PM »
I have over 1000 images with various file names such as "090220-01 Smith" or "090101-35 Jones" and I need to copy the "name" into the keyword field so they can be searched in my photoshelter archive. Is this possible as a batch action?

Yes.  Does the first part ever vary in length?  If not, then do the following:

Select your photos.
Open the IPTC Stationery Pad dialog.
Enter the following in the Keywords field of the IPTC Stationery Pad dialog (remember to set the '+' checkbox as well or your current keywords will be removed):

{filenamebase:10}

Then apply the IPTC Stationery Pad to the selected photos.

HTH,

-Kirk

Offline Icepick

  • Newcomer
  • *
  • Posts: 2
    • View Profile
Re: Filenames to keywords
« Reply #2 on: April 14, 2009, 11:41:42 AM »
Hi Kirk, thanks for your quick reply.
There will be times where the filename may be different in length. There is a whole other archive of images that use a name such as "25-100 Smith" How will this change the solution you offered?

Ian.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Filenames to keywords
« Reply #3 on: April 14, 2009, 12:17:26 PM »
Ian,

Hi Kirk, thanks for your quick reply.
There will be times where the filename may be different in length. There is a whole other archive of images that use a name such as "25-100 Smith" How will this change the solution you offered?

You just need to count the number of characters that precede the part that you want to keep.  In this case you would use:

{filenamebase:8}

...which causes the first seven letters to be skipped.

HTH,

-Kirk

Offline Ed Zirkle

  • Newcomer
  • *
  • Posts: 40
  • never grow up...
    • View Profile
    • Slightly sane photographer
Re: Filenames to keywords
« Reply #4 on: April 20, 2009, 06:46:31 PM »
HI Kirk...

So {filenamebase:x}, count the ext?  .NEF or just the #'s up to the ext?  And, I'm assuming this could be placed in the global pad for auto placement upon ingest...

Thank you...

Ed
Feed the Shark...

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Filenames to keywords
« Reply #5 on: April 20, 2009, 06:52:20 PM »
Ed,

So {filenamebase:x}, count the ext?  .NEF or just the #'s up to the ext?

{filenamebase} does not include the filename extension, just the base part of the filename.

Quote from: Ed Zirkle
And, I'm assuming this could be placed in the global pad for auto placement upon ingest...

Correct.

-Kirk

Offline Ed Zirkle

  • Newcomer
  • *
  • Posts: 40
  • never grow up...
    • View Profile
    • Slightly sane photographer
Re: Filenames to keywords
« Reply #6 on: April 20, 2009, 06:55:47 PM »
Thanks Kirk...  I see it's cloudy and 83 in SD...  need to make a trip soon...  will buy lunch if you have a moment...  Ed
Feed the Shark...