Author Topic: Incorrect renaming with {fnum}  (Read 102 times)

Offline VictorBoyko

  • Newcomer
  • *
  • Posts: 13
    • View Profile
Incorrect renaming with {fnum}
« on: November 10, 2018, 12:31:53 am »
Hi Kirk! Build 19711.

Original images were from Canon, e.g. BOY_1286.JPG.

When renaming to a longer string, in my case like BOYKO_ICELAND2018_{fnum}, every image that had a .XMP file was renamed incorrectly: the numbers lost initial zeroes, e.g. file 0005 became BOYKO_ICELAND2018_5.JPG, file 0046 became BOYKO_ICELAND2018_46.JPG.

Is this a bug or was I using the rename incorrectly?
« Last Edit: November 10, 2018, 01:53:58 am by VictorBoyko »

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 18589
    • View Profile
    • Camera Bits, Inc.
Re: Incorrect renaming with {fnum}
« Reply #1 on: November 10, 2018, 10:50:54 am »
Hi Kirk! Build 19711.

Original images were from Canon, e.g. BOY_1286.JPG.

When renaming to a longer string, in my case like BOYKO_ICELAND2018_{fnum}, every image that had a .XMP file was renamed incorrectly: the numbers lost initial zeroes, e.g. file 0005 became BOYKO_ICELAND2018_5.JPG, file 0046 became BOYKO_ICELAND2018_46.JPG.

Is this a bug or was I using the rename incorrectly?

Hard to say without some sample files to test with.  But since it isn't working for you, there is a different method, use:

BOYKO_ICELAND2018_{filenamebase:-4}

and this should grab the last four numbers off of the existing filename and append it to the new name.

HTH,

-Kirk