1 (edited by Stefan 2007-06-03 12:34:02)

Topic: Rename the name part, only the extension or both

In Siren YOU can decide which part of the name you want to rename.




Siren uses place holders to refer to this parts of the name.

%b refer to the current "base name" without the path and without the extension.
%e refer to the current extension (the suffix) without the path and without the base name.
%f refer to the hole current name with the extension but without the path.


But you can refer to the path of the file too:

   %p   : the parent directory
   %p2  : the grand parent directory
   %pn  : the nth level parent directory
   %P   : the full path to the file


------------------------------------------

Examples:

For
C:\Program Files\Windows Media Player\Skins\Windows Classic.wmz

%b refers to       Windows Classic
%e refers to       wmz
%f refers to        Windows Classic.wmz
%p refers to       Skins
%p2 refers to     Windows Media Player
%p3 refers to     Program Files
%P refers to       C:\Program Files\Windows Media Player\Skins\


------------------------------------------


So if you want to modify the extension only (here f. ex. to 'bak') just refer to the original "base name"  with %b:
%b.bak

Note that you have to insert the dot on your own.


------------------------------------------


If you want to modify the base name only just use  %e to refer to the original extension with %e:
NewSkin.%e

Note that you have to insert the dot on your own.


------------------------------------------


You can even split the base name into parts and modify each of it own:

Every variable like %b or %f can be postfixed by a "[]" modifier.
It will be split into an array of substrings following the specified separator characters.
The usage is: "[ i , "sep" ]"
   i   : number of the substring to extract.
         If negative, the extraction is done from the end.
   sep : list of separator characters, optional.
         If it is not specified, the list defined in  "Options/Modifications" is used.


Example if SPACE is one of the separator characters  in  "Options/Modifications":

For  "Windows Classic.wmz"
%b[1]  will refer to "Windows"
%b[2]  will refer to "Classic"

------------------------------------------


And that's not all!  There's even more ...


Every variable can be postfixed by a "()" modifier.
This modifier can have several functions, e.g:

- Substring extraction
   The usage is very near of the standard "substr":
   "( pos, nb )"
   pos  : starting position.
          If negative, it is relative to the end of the string.
   nb   : number of characters.
          If it is not specified, the extraction is done until  the end.
          If negative, the number of characters to extract is  computed from the end of the string.



Example:

For  "Windows Classic.wmz"
%b(4)     will refer to "dows Classic.wmz"  skipping the first 3 chars and start with the char No. 4  till the end of string.
%b(1,7)  will refer to "Windows"               gives the first till the seventh char means: start by 1 and give the next 7 chars.


------------------------------------------




Press the F1-key while you are in Siren to read more about.
Enjoy Siren,  No installation needed, unzip and run. Siren stores it settings into an ini file.
------------------------------------------------------------------------------------------------------------

                                             Siren is a freeware file renaming program
                                               - portable, highly flexible, powerfully -
                                          If it's looking tricky it's easy to rename with Siren.
                                          http://www.scarabee-software.net/en/siren.html