nomino
Batch rename utility for developers

How to install
Pre-Compiled
You can download a pre-compiled executable for Linux, MacOS and Windows operating systems, then you should copy that executable to a location from your $PATH env:
You might need to run chmod +x nomino-linux-64bit or chmod +x nomino-macos-64bit.
Build Manually
If you prefer to build nomino manually, or a pre-compiled executable is not provided for your target, then you can build nomino from scratch:
- Install Rust:
curl -sSf https://sh.rustup.rs | sh - Run
cargo install nomino
Usage
)
)
Placeholders
- Placeholders have the format of
{G:P}whereGis the captured group andPis the padding of digits with0. For example,{2:3}means the third captured group with a padding of 3, i.e.1is formatted as001. - Indices start from
0, and{0}means the filename. - The capture group
Gcould be dropped, i.e.{}or{:3}. In this case an auto incremental index is used which starts from1. For example,{} {}equals{1} {2}. {and}characters could be escaped using\character, i.e.\\{and\\}in cli.- Padding is only used for positive numbers, e.g. the formatted result of
{:3}for1is001, for-1is-1and foraisa. - If
--sortoption is used, the first index{0}is the filename and the second index{1}or first occurrence of{}is the enumerator index.
Capture Groups
The accepted syntax of regex pattern is Rust Regex.
Consider this example:
(?<first>\w)(\w)\w(?<last>\w)
This regular expression defines 4 capture groups:
- The group at index
0corresponds to the overall match. It is always present in every match and never has a name:{0}. - The group at index
1with namefirstcorresponding to the first letter:{1},{first}or the first occurrence of{}. - The group at index
2with no name corresponding to the second letter:{2}or the second occurrence of{}. - The group at index
3with namelastcorresponding to the fourth and last letter:{3},{last}or the third occurrence of{}.
?<first> and ?<last> are named capture groups.
Windows
On Windows, \\ must be used to separate path components in file paths because \ is a special character in regular expressions.
Map file format