Author Topic: Help with Variables- File names  (Read 2270 times)

Offline bvonarx

  • Newcomer
  • *
  • Posts: 41
    • View Profile
Help with Variables- File names
« on: August 15, 2013, 09:07:26 AM »
PM5 build 1319(a16ea99)
MAC 10.8.4

I am trying to figure out the proper way to include a file name in a keyword field, the wrinkle being that I want it to appear as the “renamed as” name in a sub folder which is where the problem lies.

My process is as follows:

Ingest to a main folder using a preset IPTC with the “Rename ingested photos as” box checked

Select > edit > caption then “Save as” (which is a jpg) to sub folder

I have tried this with {filename} which returns 20130801_ABC__123.nef

and

{filebase} which returns the out of camera file name DSC_123.nef

What I ultimately want in the sub file is just the renamed file without the extension (like this 20130801_ABC_123)

What am I missing/doing wrong in my process? Thank you for your help.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24756
    • View Profile
    • Camera Bits, Inc.
Re: Help with Variables- File names
« Reply #1 on: August 15, 2013, 09:47:46 AM »
I am trying to figure out the proper way to include a file name in a keyword field, the wrinkle being that I want it to appear as the “renamed as” name in a sub folder which is where the problem lies.

My process is as follows:

Ingest to a main folder using a preset IPTC with the “Rename ingested photos as” box checked

Select > edit > caption then “Save as” (which is a jpg) to sub folder

I have tried this with {filename} which returns 20130801_ABC__123.nef

and

{filebase} which returns the out of camera file name DSC_123.nef

What I ultimately want in the sub file is just the renamed file without the extension (like this 20130801_ABC_123)

Hmm.  There is no variable {filebase} perhaps you meant {filenamebase}?  There should never be a case where {filename:0,-4} and {filenamebase} would produce different base file names.

Perhaps you could present an example where the two values would differ?

Thanks,

-Kirk

Offline bvonarx

  • Newcomer
  • *
  • Posts: 41
    • View Profile
Re: Help with Variables- File names
« Reply #2 on: August 16, 2013, 12:01:04 PM »
So here is the question illustrated, why when after using “save as” (having used "filename" as a variable in the IPTC) does the original extension .nef appear in the saved as IPTC? Thank you for your help



[attachment deleted by admin]
« Last Edit: August 16, 2013, 12:09:36 PM by bvonarx »

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24756
    • View Profile
    • Camera Bits, Inc.
Re: Help with Variables- File names
« Reply #3 on: August 16, 2013, 01:44:03 PM »
So here is the question illustrated, why when after using “save as” (having used "filename" as a variable in the IPTC) does the original extension .nef appear in the saved as IPTC? Thank you for your help

Well, you're not applying an IPTC Stationery Pad so what was the source image (the one used to Save As, producing the JPEG) and what did it have in its Keywords field before the Save As?

Variables only expand once.  So if you used {filename} in the Keywords of a NEF file then it will indeed end in .nef (or .NEF) and it will stay that way, no matter what file format you choose to save it as.

-Kirk

Offline bvonarx

  • Newcomer
  • *
  • Posts: 41
    • View Profile
Re: Help with Variables- File names
« Reply #4 on: August 16, 2013, 01:54:54 PM »
Ok, i get it now. I assumed/hoped the keyword would expand to the saved as file, will have to rethink how to use {filename} for use in the final version of the file. Thanks you very much for your help.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24756
    • View Profile
    • Camera Bits, Inc.
Re: Help with Variables- File names
« Reply #5 on: August 16, 2013, 02:37:13 PM »
Ok, i get it now. I assumed/hoped the keyword would expand to the saved as file, will have to rethink how to use {filename} for use in the final version of the file. Thanks you very much for your help.

You can always apply an IPTC Stationery Pad with {filename} in the Keywords during the Save As.  Leave it out in your earlier workflow.

-Kirk