A Python re-write of vimv — bulk rename files by editing their names in your preferred text editor.
pip install .Or install in development mode:
pip install -e .emvThis lists all files in the current directory. Edit the names in your editor, save, and close. emv renames each file whose name changed.
emv file1.txt file2.txt image.pngOnly the specified files are shown for renaming.
emv -rWalks the full directory tree and lists all files with their relative paths. Renaming a path can also move a file into a different directory.
$ ls
photos/
001.jpg
002.jpg
003.jpg
$ emv photos/*.jpg
# Editor opens with:
# photos/001.jpg
# photos/002.jpg
# photos/003.jpg
# Edit to:
# photos/vacation_001.jpg
# photos/vacation_002.jpg
# photos/vacation_003.jpg
# Save & close → output:
# 3 files renamed.
If you add or remove lines (so the number of names doesn't match the original), the operation is aborted with a warning. If a destination file already exists, that file is skipped.
By default, emv opens Notepad. To use a different editor, set the EDITOR environment variable:
# VS Code (wait flag so the CLI waits for you to close the tab)
set EDITOR=code -w
emv
# Vim
set EDITOR=vim
emv
# Editor with a quoted path containing spaces
set EDITOR="C:\Program Files\Notepad++\notepad++.exe" -multiInst
emvThe value of EDITOR is parsed safely to handle quoted paths and command-line flags.