Batch rename utility for developers
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
.
You can use nominoAUR package to install nomino in Arch Linux.
The nominoAUR package depends on rust package, if you have installed rust
using rustup
, then use makepkg -dsi
to install it by ignoring dependencies.
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:
curl -sSf https://sh.rustup.rs | sh
cargo install nomino
```bash USAGE: nomino [FLAGS] [OPTIONS] [[SOURCE] OUTPUT]...
FLAGS: -e, --extension Preserves the extension of input files in 'sort' and 'regex' options -h, --help Prints help information -k, --mkdir Recursively creates all parent directories of '
OPTIONS:
--depth
ARGS: <[SOURCE] OUTPUT>... OUTPUT is the pattern to be used for renaming files, and SOURCE is the optional regex pattern to match by filenames. SOURCE has the same function as -r option ```
json
{
"<input1>": "<output1>",
"<input2>": "<output2>",
"<...>": "<...>"
}
The output is necessary when using --sort
or --regex
options.
The accepted syntax of regex pattern is RE2.
{I:P}
where I
is the index of captured group and P
is the padding of digits with 0
. For example, {2:3}
means the third captured group with a padding of 3, i.e. 1
is formatted as 001
.0
, and {0}
means the filename.I
could be dropped, i.e. {}
or {:3}
. In this case an auto incremental index is used which starts from 1
. For example, {} {}
equals {1} {2}
.{
and }
characters could be escaped using \
character, i.e. \\{
and \\}
in cli.{:3}
for 1
is 001
, for -1
is -1
and for a
is a
.--sort
option is used, the first index {0}
is the filename and the second index {1}
or first occurrence of {}
is the enumerator index.