File renaming mask

Top  Previous  Next

File renaming mask can be used for quick renaming of a group of files. With the mask it is possible to e.g. number files or add the date to file names.

 

The mask may have a static text and formatting (substitutes), replaced with values.

All substitutes have the following format:

<{substitution code}{parameters}>

Here {substitution code} – is usually a single character in lower or upper case.

Here {parameters} – is a string of additional parameters, specific for the substitution type.

 

Notes:

In any of these substitutions parameters aren't required.

If required inside the parameters string it is possible to use spaces for easier reading, with exception of substitutions, containing other substitutions: <L…>,<+…>, <-…>, <F…> (spaces inside these substitutions have meaning).

 

Table of possible substitutions:

Substitution

Description

<N>

or

* (till dot in records like *.*)

File name substitution. By default substitutes the full name.

 

Parameters:

<N{number}> – single character of the name with the index {number} (starting with 1), in this case a positive number must be used.

 

<N{number1}-{number2}> – part of the name between symbols with indexes from {number1} to {number2}.

May be specified {number1} or {number2}, meaning "starting with" or "ending with".

If negative numbers are used or {number1} or {number2}, characters are counted from the name end. Where -1 – last symbol, -2 – the symbol before the last, etc.

 

<N{number},{length}> – similar to the previous construction, but the previous argument specifies length, not index of cut sequence of characters.

 

<Nw{word index}>  – cuts from name and substitutes a word with the specified number.

 

<Nw{word index1}-{word index2}>  – substitutes words starting with the  first index and ending with the second one. If the number of the first or second word isn’t specified, replaces from the beginning or till the end of the name respectively.

 

<Nw({word index1}-{word index2})>  – if the index is started or ended with the round bracket, text starting with the first character after the specified word and till first character before the specified word.

 

 

<E>

or

* (after dot in records like *.*)

 

 

Same format as for <N>, substituting file extension.

<P>

<PP>

<PPP>

Substitutes the name of a parent folder. If <P>, of the previous parent, if – <PP>, the name of the previous before previous parent, etc.

 

Substitution can specify parameters to cut a portion of folder name. The same format is used as for <N> and <E>.

 

 

 

<D>

Substitution of file modification date.

By default the date is defined in format: "yyyymmdd".

 

Parameters:

<D{format}> – {format} – arbitrary combination of date format specifications):

 

yy / yyyy – year,

m / mm / mmm / mmmm – month,

d / dd – day of month,

h / hh – hours,

n / nn – minutes,

s / ss – seconds,

"am/pm", "a/p", "ampm" – 12-hours format,

ddd / dddd – name of day of week,

ddddd / dddddd – short/long date format, according to system settings.

 

 

<C>

Insert index.

 

Parameters:

<C{initial} +/-{step} #{decimal places} &{Dec/Hex/Symb-format}> – specifies parameters for the counter.

 

Any parameter is optional. Order of parameters is arbitrary, except the initial value, which must be first if specified.

If {initial} – is a string of latin characters, the counter will be changing within the alphabet (e.g.: "aa", "ab", …, "ba",… "zz"). Otherwise counting is done using decimal numbers, unless another system is specified in "&…".

Option {step} – is a whole number, which must be preceded by "+" or "-", specifying the direction of counter change.

Option {decimal places} must start with "#", specifies the number of characters in the counter (1 by default).

Option "&…" may be "&H", "&D", "&S", which means hexadecimal, decimal or symbolic counter format. The parameter may not conflict with the initial value. If hexadecimal format is specified, the initial value must be hexadecimal as well.

 

 

<L>

Inserts leading symbols. Can be used to create symbolic names, sortable in the same order as numbers.

 

Parameters:

<L{length},{repeating text},{text}>

Example: "<L 3,0,<n>>.<e>" converts  "1.txt" into "001.txt".

Spaces are meaningful in the second and last portions of the substitution.

 

 

<+>

Uppercases the text.

 

It can wrap other substitutions.

Example: "<+<n>.<e>>" converts "Some file.txt" into "SOME FILE.TXT".

 

 

<->

Lowercases the text. Similar but opposite to "<+>".

 

 

<F>

Uppercases first letters of each word.

Example: "<F<n>>.<e>" converts "Some file.txt" into "Some File.txt".