Loading ...
Sorry, an error occurred while loading the content.
 

Leading zero's removed using ^!Inc

Expand Messages
  • twinlor
    Hi All, I am building a library to hold file renaming clips. Thanks to our good friend Jody I ve got a starting point.. his clip Rename
    Message 1 of 3 , Dec 1, 2012
      Hi All,

      I am building a library to hold file renaming clips. Thanks to our good friend Jody I've got a starting point.. his clip 'Rename FileNames/Increment...' from his DirStuff library.

      I want to allow user to designate the number of characters for the incrementing variable AND use leading zero's.

      examples of final results:
      newname_001.txt thru newname_087.txt
      or
      newname_024.png thru newname_547.png

      I cannot see how to set the number of characters for the counting variable and the ^!Inc command trims leading zero's.

      Any help or directions?

      Thanks,

      David
    • Axel Berger
      ... Yes, that s an oldie. If %var% is your number, then what you use in the filename is: ^$StrCopyRight( 000^%var% ;3)$ Axel
      Message 2 of 3 , Dec 1, 2012
        twinlor wrote:
        > Any help or directions?

        Yes, that's an oldie. If %var% is your number, then what you use in the
        filename is:

        ^$StrCopyRight("000^%var%";3)$

        Axel
      • twinlor
        Thanks, Axel. I will implement tomorrow. I don t see exactly how but I ll be back if necessary. PLEASE DON T TELL ME YET. I need to learn. - David
        Message 3 of 3 , Dec 1, 2012
          Thanks, Axel.

          I will implement tomorrow. I don't see exactly how but I'll be back if necessary. PLEASE DON'T TELL ME YET. I need to learn.

          - David



          > > Any help or directions?
          >
          > Yes, that's an oldie. If %var% is your number, then what you use in the
          > filename is:
          >
          > ^$StrCopyRight("000^%var%";3)$
          >
          > Axel
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.