Author Topic: {frame} number too short  (Read 1126 times)

Offline fotopan

  • Newcomer
  • *
  • Posts: 8
    • View Profile
{frame} number too short
« on: December 04, 2016, 02:40:05 PM »
Hello,
I am using Photo Mechanic version 5.0.0.0 build 17719 (c8049ca). When doing ingest of files written by Ricoh GR II camera I try to rename ingested photos as {datesort}-{frame}. The files have original filenames like DCIM\123_1101\R0002027.JPG so I would expect they would be renamed to something like 20161101-0002027.JPG (with three leading zeros) - however I get filenames as if I have used {frame4} variable: 20161101-2027.JPG.

What am I doing wrong?
--
Pawel

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 20631
    • View Profile
    • Camera Bits, Inc.
Re: {frame} number too short
« Reply #1 on: December 04, 2016, 05:32:48 PM »
Hello,
I am using Photo Mechanic version 5.0.0.0 build 17719 (c8049ca). When doing ingest of files written by Ricoh GR II camera I try to rename ingested photos as {datesort}-{frame}. The files have original filenames like DCIM\123_1101\R0002027.JPG so I would expect they would be renamed to something like 20161101-0002027.JPG (with three leading zeros) - however I get filenames as if I have used {frame4} variable: 20161101-2027.JPG.

What am I doing wrong?

Generally cameras produce filenames like IMG_1234.JPG or _IMG1234.JPG so {frame} and {frame4} are equivalent.  Some cameras allow you to choose those leading letters making it possible to use your initials.  If your camera doesn't have an internal frame value in its maker note then PM is going to use the last four letters (if they appear to be digits) as the {frame}.

If you know that your camera doesn't roll over at 9999 to 0000 then you can use Variable Substring Extraction to extract the significant digits:

http://wiki.camerabits.com/en/index.php?title=User_Manual_Flat_View#Variable_Substring_Extraction

Like so:

{filenamebase:-7} as your substitute for {frame} in your renaming string.

HTH,

-Kirk