Author Topic: Leading zeros when renaming files  (Read 5742 times)

Offline FairfieldPhoto

  • Full Member
  • ***
  • Posts: 216
    • View Profile
    • Fairfield Photography, LLC
Leading zeros when renaming files
« on: June 14, 2006, 03:31:35 PM »
I do batch renaming of pictures to correspond to runner numbers.  To make the resulting sorting easier, it would be nice if there was a way to indicate how many leading zeros should be used.  If I put leading zeros in, then 002, 003, 004, 021, 022, 033 sort correctly in Windows Explorer instead of coming out 2, 21, 22, 3, 33, 4.

-Mike

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 21338
    • View Profile
    • Camera Bits, Inc.
Re: Leading zeros when renaming files
« Reply #1 on: June 14, 2006, 04:03:19 PM »
I do batch renaming of pictures to correspond to runner numbers.  To make the resulting sorting easier, it would be nice if there was a way to indicate how many leading zeros should be used.  If I put leading zeros in, then 002, 003, 004, 021, 022, 033 sort correctly in Windows Explorer instead of coming out 2, 21, 22, 3, 33, 4.

Make your sequence number be 001 instead of 1.  Or if you need more total digits, enter more initial zeroes.

HTH,

-Kirk

Offline FairfieldPhoto

  • Full Member
  • ***
  • Posts: 216
    • View Profile
    • Fairfield Photography, LLC
Re: Leading zeros when renaming files
« Reply #2 on: June 14, 2006, 05:00:33 PM »
I don't use the sequence number.  The number that I preface the file with is the runner's bib number so runner #123 gets a file name of 123-D2H_3344.jpg.  I can then use Windows Explorer to drag/drop images into a directory (named "Race Number 123") for that competitor.  The last step is my internet viewing system upload process which takes each directory and puts a link to a mini-gallery containing just that competitor's pictures.

-Mike

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 21338
    • View Profile
    • Camera Bits, Inc.
Re: Leading zeros when renaming files
« Reply #3 on: June 14, 2006, 05:28:43 PM »
I don't use the sequence number.  The number that I preface the file with is the runner's bib number so runner #123 gets a file name of 123-D2H_3344.jpg.  I can then use Windows Explorer to drag/drop images into a directory (named "Race Number 123") for that competitor.  The last step is my internet viewing system upload process which takes each directory and puts a link to a mini-gallery containing just that competitor's pictures.

OK, then you've got me thoroughly confused.  What is it that you want PM to do again?  The only automatic numbering capability is with the sequence number.

What is your current renaming string?  How would PM know to add additional zeroes if you're not using the sequence number?

-Kirk

Offline FairfieldPhoto

  • Full Member
  • ***
  • Posts: 216
    • View Profile
    • Fairfield Photography, LLC
Re: Leading zeros when renaming files
« Reply #4 on: June 14, 2006, 06:42:44 PM »
In trying to frame up a response to this, I think I ended up answering my own question.

What I need to do is to make sure that the runner's bib number has leading zeros when I enter it in the {suppcat2} field.  Then when I rename the file with the string {suppcat2}-{filename}, I will get the right values displayed and then, the correct sort.

Sorry to take this thread down a dead-end.

-Mike