Awesome
Ren
ren
is a command-line utility that takes find
-formatted lines via standard input, and batch renames them. By default, it outputs a diff
-preview of the renamed files and directories to standard output, and with a flag it can rename the files and directories.
Example
Output a diff to standard output showing the result of finding all the files containing foo
in their name, and replacing foo
to bar
in their names:
find . -name '*foo*' | ren foo bar
Add the -w
(--write
) flag to rename the files:
find . -name '*foo*' | ren foo bar
Installation
ren
is available via cargo
:
cargo install ren-find
Configuration
The default pager is less
, the REN_PAGER
environment variable can be used to override the pager (e.g., export REN_PAGER=delta
in Bash).
Help
ren -h
(or ren --help
, the full --help
provides slightly longer explanations of some option) will list help for all the command-line flags.