Batch rename files using your editor. The script is pretty short and simple - I encourage you to look at it yourself to see what it does in detail.
virename
virename *.png
find -not -name "*.png" | virename -
EDITOR=nvim virename
- Create all leading destination directories if they don't exist by using
install -D
MV='install -D' virename
- Integrate with git using
git mv
git ls-files -m | MV='git mv -v' virename -
I was obviously inspired by vimv. Thing is - it does some questionable things (evals, using ls
output, repeatedly echo-appending to the same file and such). I could've opened a couple of PR's to fix all theese things, but that would be me basically rewriting the whole script - why not just do exactly that here? And add a couple of features while I'm at it - support for reading the filenames from stdin, and customizable mv command. The latter allowed me to remove git mv
and mkdir -p
integrations from the script itself, but still make them (and much more) possible :)