rnr-0.2.0 is not a library.
RnR
rnr
is a command-line tool to batch rename files and directories.
Install
Binaries
GitHub Releases
You can download binaries from latest release page, choose the compressed file corresponding to your platform. These compressed files contain the executable and other additional content such as completion files (Bash, Zsh, fish and PowerShell).
Arch Linux
A package is available in the AUR
(rnr
) to install latest version of
RnR on Arch Linux.
From Source
RnR is written in Rust. You can build it from source using Cargo.
From git repository
From Crates.io
Options
USAGE:
rnr [FLAGS] [OPTIONS] <EXPRESSION> <REPLACEMENT> <PATH(S)>...
FLAGS:
-b, --backup Generate file backups before renaming
-n, --dry-run Only show what would be done (default mode)
-f, --force Make actual changes to files
-h, --help Prints help information
-x, --hidden Include hidden files and directories
-D, --include-dirs Rename matching directories
-r, --recursive Recursive mode
-s, --silent Do not print any information
-V, --version Prints version information
OPTIONS:
--color <color> Set color output mode [default: auto]
[possible values: always, auto, never]
-d, --max-depth <LEVEL> Set max depth in recursive mode
ARGS:
<EXPRESSION> Expression to match (can be a regex)
<REPLACEMENT> Expression replacement
<PATH(S)>... Target paths
Default behavior
- Dry-run by default.
- Only UTF-8 valid input arguments and filenames.
- Works on files and symlinks (ignores directories).
- Accepts multiple files as arguments.
- Accepts a regex to generate matches. These expressions have same
limitations of
regex
crate. It supports capture groups. - If max depth is not provided to recursive mode, it is assumed infinite.
- Does not generate backups.
- Output is colored (only ANSI terminals).
- Ignore hidden files and directories.