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 :
-
New file names are built by processing the template from left to right.
-
%[fn] in a template tells SAMenu to insert the name of the current
file, without the file extension.
-
%[ex] tells SAMenu to insert the file extension of the current file.
-
% 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.
-
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.
-
Any other text in the template is added as-is.
Rename template examples
The template, file_%1+.%[ex], means :
-
start with the text "file_"
-
add a counter (starting at one, increasing),
-
add "."
-
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 :
-
add the original filename,
- add "."
- 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.