Name expressions
This operation renames selected item or items. Simple rules can be defined to allow advanced name manipulations.
Each rule is encodes in brackets []
is defined by a special letter (the letter is case-insensitive).
The rules can be combined with normal text which is used as is when evaluating the rules.
Rules can have multiple parameters separated by colon :
.
If the parameter has a default value, then it can be omitted but the colon separator must be present.
Rules can be nested. Rules are evaluated independently for each item.
Rules can be combined with wildcards * or *.* which represent the whole item name with extension.
The only exception is Counter which takes into account the order of items.
Renaming rules can also be used in other operations such as copy or move to rename the items during the operation.
Trailing dots are removed from the final name because they are not allowed in some operating systems.
The original names and the new names can be previewed side by side before the operation is executed and potential conflicts are reported.
Any special character such as brackets or colons can be escaped by backslash \
.
Item name [N] and extension [E]
[N:start:length]
or [E:start:length]
rules use a part (or the whole) item name or extension.
Note that folders and links to folders do not have extensions. Files and application bundles (on macOS) have extensions.
Parameters:
start
= the first position; numeric, default value equals to the length of teh text; when negative number is used, then the position is counted from the endlength
= the number of characters counted from start position, positive value counts to right, negative to left; numeric, default value is the negative value ofstart
Examples:
[N]
returns the item name without extension[N:3]
returns first three characters[N:-3]
returns last three characters[N:3:1]
returns the third character from the left[N:-3:1]
returns the third character from the right
Counter [C]
[C:digits:start:step]
rule adds a counter (a numeric sequence) into the target name.
Parameters:
digits
= the minimum number of digits (padded with zeros from the left); numeric, default value is 1start
= the first value in the sequence; numeric, default value is 1step
= the step of the numeric sequence; numeric, default value is 1
Examples:
[C]
generates sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...[C:2]
generates sequence 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, ...[C::0:5]
generates sequence 0, 5, 10, 15, 20, 25, 30, 35, 40, ...
Upper case [U] and lower case [L]
[U:text]
or [L:text]
rule converts text to upper case or lower case.
Parameters:
text
= the text to convert; text, default value is the whole item name with extension
Examples:
[U]
converts the whole item name with extension to upper case[U:[N]].[E]
converts item name to upper case but leaves the extension as is
Date [D] and time [T] of modification
[D:format]
and [T:format]
rules use date and time of last modification as a formatted text.
Parameters:
format
= specific format of date or time; text, default value is the format set in Preferences
Examples:
[N]-[D:yyyy-mm-dd].[E]
renames for example "info.doc" to "info-2021-07-11.doc" (assuming its date of modification)
Substitute text [S]
Not yet implemented.
[S:what:with:scope]
rule substitutes (i.e. replaces) text with another text.
Parameters:
what
= the old text; text, no default valuewith
= the new text; text, default value is empty text (replacing with empty text means removing the text)scope
= the text to search in; text, default value is the whole item name (with extension)
Examples:
[S:tmp:temp]
replaces every occurrence of "tmp" with "temp"[S:image]
replaces every occurrence of "image" with empty text, i.e. removes "image" from the item name[N].[S:tmp:temp:[E]]
replaces "tmp" with "temp" in extensions while keeping the names
Padding [P]
Not yet implemented.
[P:text:size:character]
uses padding for a text from the left with a specified character to a fixed size.
Parameters:
text
= the original text; text, no default valuesize
= the fixed size of the result; number, no default valuecharacter
= the character to be used to fill the space; text, no default value
Word uppercase [WU]
Not yet implemented.
[WU:text]
converts to uppercase every letter which is preceded by a non-letter character.
Parameters:
text
= the original text; text, default value is the file name without extension
Word lowercase [WL]
Not yet implemented.
[WL:text]
converts to lowercase every letter which is preceded by another letter.
Parameters:
text
= the original text; text, default value is the file name without extension
Word split [WS]
Not yet implemented.
[WS:delimiter:text]
inserts a delimiter before every upper case letter.
Parameters:
delimiter
= the delimiter character; text, no default valuetext
= the original text; text, default value is the file name without extension
Image width [W] and height [H]
Not yet implemented.
[W]
or [H]
rule uses image width or height in pixels. There are no parameters.
Return 0 for items which are not images.
Examples:
[N]-[W]x[H].[E]
replaces for example "icon.png" with "icon-16x16.png" (assuming its resolution)
Auto-numbering [A]
Not yet implemented.
[A:...:...:...]
generates automatic counter if there are conflicts. Similar to counter... TODO!