SAMenu renaming

SAMenu renaming templates

How they work

Because the "%" is not a valid character for a file name, SAMenu uses it in the renaming templates to signal that that a special sequence of characters follows. These are the six basic rules for renaming templates :

  1. New file names are built by processing the template from left to right.
  2. %[fn] in a template tells SAMenu to insert the name of the current file, without the file extension.
  3. %[ex] tells SAMenu to insert the file extension of the current file.
  4. % followed by a number tells SAMenu to create a counter that starts at that number. For each file in the batch, the counter is inserted. Then, the counter increased or decreased by one, depending on the character immediately following the number. If the character following the number is "-", the counter is decreased; if the character is a "+", the counter is increased.

    Example: %5+ creates a counter that starts at five and increases for each file; %100- creates a counter that starts at 100 and decreases for each file.
  5. If the in rule 4 number is preceded by one or more 0's, the number of 0's indicates the number of decimal places that the counter should occupy, adding leading 0's if necessary.

    Example : %0007+.tmp creates a counter starting at seven and increasing, adding ".tmp" for the file extension. The three 0's instruct SAMenu to create the counter text so that it contains at least three digits :

        007.tmp
        008.tmp
        009.tmp
        010.tmp
        011.tmp
        012.tmp

    This will insure that files are properly sorted by Explorer.
  6. Any other text in the template is added as-is.


Rename template examples

The template, file_%1+.%[ex], means :

  1. start with the text "file_"
  2. add a counter (starting at one, increasing),
  3. add "."
  4. add the orignal file extension.
This chart shows the results of using this template :

Selected File Name New File Name
Picture.JPG file_1.JPG
Something.Doc file_2.Doc
Whatever.XXX file_3.XXX


Here's another sample : %[fn].%[ex] .
This has no effect at all on the file names because it tells SAMenu to :

  1. add the original filename,
  2. add "."
  3. add the original file extension
It simply rebuilds the original filename!


One more : %[ex]%1+

Selected File Name New File Name
First.JPG JPG1
Second.JPG JPG2
Third.JPG JPG3


Last one : %[ex]%100-.tmp

Selected File Name New File Name
First.JPG JPG100.tmp
Second.JPG JPG99.tmp
Third.JPG JPG98.tmp


Copyright © 2008, Smaller Animals Software, Inc.

Smaller Animals News

ThumbNailer 9.0

  • The latest version of ThumbNailer is out!

    ImgSource 4.0

  • ImgSource 4.0 now has x64 support!

    New Product!!!!

    Introducing ClickPic! This little program lets you quickly resize, rotate and convert images, all from within Windows Explorer. Just right-click on an image file!