Tool:brename: safely batch renaming files/directories via regular expression
Hi all, this post comes from here.
Yes, there are already existed shell commands
mv for batch renaming, being very simple to use.
There’s no reason to reinvent the wheels, I agreed.
But one day, I overwrote some important files in a batch renaming operation, which might be family images or raw reads.
You know, removed files can be found in the trash or recovered, but overwritten files are nearly impossible to recover.
Therefore I decided to write a safer batch renaming tool, that could detect overwriting conflicts.
That is the brename: a CLI tool for safely batch renaming files/directories via regular expression.
Here are some main reasons:
- Brename supports dry run, by showing which files are going to be renamed and what the new names are. This makes users feel safe.
- Besides, it detects potential overwriting conflicts before renaming, which helps avoid overwriting important files like raw FASTQ reads.
- At last, it can undo the last operation like the
ctrl + zshortcut. This gives users a chance to rescue the wrong move. This is extremely useful when newly renamed contain less information to recover the original names, that is to say, you can’t re-batch-rename.
- Easy to install. Providing statically-linked executable binary files for Linux, Windows, and macOS.
- Recursively renaming both files and directories.
- File filtering. Supporting including and excluding files via regular expression.
No need to run commands like
find ./ -name "*.html" -exec CMD.
- Renaming submatch with corresponding value via key-value file.
- Renaming via ascending integer.
Similar tools: here’s a benchmark of similar tools,
brename ranks 2nd. But safety is the most important point.
• 43 views
Read more here: Source link