A simple and efficient command line bulk file renaming tool that works in concert with your favorite text editors
Demo.webm
- Efficient batch renaming workflow: π¨ Run β ποΈEdit β πΎ Save β β¨ Rename
- Can invoke your favorite text editors to determine the name of the file to be changed. e.g. Vim, Emacs, nano, etc. (
-e
,--editor
option or$EDITOR
environment variable) - Fail-safe: dry-run mode by default (run by
-x
,--execute
option)
The arguments are as follows:
Usage: renedit [OPTIONS] --editor <EDITOR> <PATH>...
Arguments:
<PATH>... Target directories or files
Options:
-e, --editor <EDITOR> Command of text editor [env: EDITOR=nvim]
-d, --definition-file <DEFINITION_FILE> Path to definition file
-x, --execute Execute renaming (disable DRY-RUN mode)
-y, --yes Allow all rename confirmations
-h, --help Print help
- π¨ Run: Run this command like:
renedit --editor nvim path/to/files --execute
- ποΈEdit: When the command is invoked, the editor is automatically launched. A text file with the path to the file will open, edit it to the name you want to change
- πΎ Save: Overwrites the file and exits. For example, in Vim/Neovim, type
:wq
. - β¨ Rename:
- If the
-x
,--execute
option is specified, you can batch rename to the changed name when you exit the editor. If not specified, the paths before and after the rename will be displayed. - When renaming, type
y
,yes
orEnter
at the confirmation prompt. - If you specify the
-y
or--yes
option at startup, you can skip the confirmation and execute the renaming at once.
- If the
To build from source, clone this repository and run cargo install --path=.
MIT
This tool was inspired by itchyny/mmv written in Go, Thanks!