Author Topic: Variables  (Read 3036 times)

Offline RonaldFrommann

  • Newcomer
  • *
  • Posts: 25
    • View Profile
Variables
« on: September 01, 2010, 02:07:46 PM »
Hello together

I need help for a small problem:
If I want to rename files keeping the 4 digit serial number of the file, what formula do I have to write into the variables window in the rename dialog?
Example: Hamburger_0345.jpg should be renamed to Burger King_0345.jpg
Any ideas?
Thanks in advance

Ronald Frommann, Hamburg

Offline RonaldFrommann

  • Newcomer
  • *
  • Posts: 25
    • View Profile
Re: Variables
« Reply #1 on: September 01, 2010, 02:12:10 PM »
Sorry, I didn't see, that there was a similar post just recently. So I just read the solution there : {frame4)
That works.

Ronald

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Variables
« Reply #2 on: September 01, 2010, 02:13:11 PM »
Ronald,

I need help for a small problem:
If I want to rename files keeping the 4 digit serial number of the file, what formula do I have to write into the variables window in the rename dialog?
Example: Hamburger_0345.jpg should be renamed to Burger King_0345.jpg

Burger King_{filenamebase:-4}

That should do it. "{filenamebase:-4}" gets the last four characters of the base filename (filename without its extension) and appends them onto your 'Burger King_' text.

Also, using {frame4} may work, though it depends on whether the image came from a camera or not.  You can always look at the text at the bottom of the Rename dialog to see what your results will be.

-Kirk