| Crates.io | rrn |
| lib.rs | rrn |
| version | 0.1.3 |
| created_at | 2025-08-06 01:43:55.299981+00 |
| updated_at | 2025-08-21 08:39:54.227357+00 |
| description | batch rename files/dirs by regex |
| homepage | https://itcraft.cn/rrn/ |
| repository | https://github.com/itcraft-cn/rrn |
| max_upload_size | |
| id | 1783306 |
| size | 47,184 |
batch rename files/dirs by regex.
Tribute to f2.
Currently, it has an issue #120 which it cannot replace filenames or folders containing spaces.
However, this is a common usage scenario. As a temporary solution, I've created a small tool to address this.
It's just a simple toy.
$ rrn
------------------------------------------------------
rrn a rename file / directory tool.
-f <pattern>, necessary: true
from pattern
-t <pattern>, necessary: true
to pattern
-d, optional, default: none
rename directories or files, default is rename files.
-x, optional, default: dry run
execution the rename process
-h, output help message
-v, output version info
------------------------------------------------------
$ ls
acca.txt accca.txt acccca.txt a.txt
$ rrn -f a -t b
------------------------------------
| from | to | status |
------------------------------------
| a.txt | b.txt | OK |
| acccca.txt | bccccb.txt | OK |
| accca.txt | bcccb.txt | OK |
| acca.txt | bccb.txt | OK |
------------------------------------
This is dryrun. Execute with '-x' to execute.
$ rrn -f a -t b -x
Move "a.txt" => "b.txt"
Move "acccca.txt" => "bccccb.txt"
Move "accca.txt" => "bcccb.txt"
Move "acca.txt" => "bccb.txt"