Batch rename files in your editor with vidir
I have always used the built in tool :bulkrename in my file manager Ranger to batch rename files and directories. Unfortunately, that feature has been broken for ages now, and I haven’t had much success in finding an alternative that I like and is available in the repositories.
However. I have finally managed to find an alternative that works great for me. The tool is called vidir. It’s available in Devuan (and Debian) with the package name moreutils.
You simply use the vidir with a regular argument or by piping something to it. Here’s an example how you edit all the files in the current working directory:
vidir .
Here’s how you can edit all files that ends with .flac:
vidir *.flac
It then opens your $EDITOR with the filenames like this:
0001 ./01-loved.flac
0002 ./02-ever_after.flac
0003 ./03-jacob.flac
0004 ./04-night_shapes.flac
0005 ./05-spiral_gaze.flac
And now it’s super simple to batch edit the filenames with your editor of choice.
Comments
There's no comments for this post. Use this e-mail form if you would like to leave a /public/ comment on this post. Or simply send me a private e-mail message if you have any feedback, or just want to say hello.