A simple cli tool for batch renaming files and folders, written in Rust.
Project description
Renify
A simple cli tool for batch renaming files and folders, written in Rust.
- support files
- support folders
- symlinks are not supported!
Installation
You can install with pip
or cargo
cargo install renify
pip install renify
Usage
For those new to Renify, consider using the following code for interactive mode:
renify -i <File or Folder Path>
Or you can use:
renify -i <File or Folder Path> --target file --method znum --nbits 5 --recursive false --start 1 -y
You can revert to the previous state of the modifications by using:
renify -i . --roll
You can get help from:
renify --help
Methods
- random: Sample a u8, uniformly distributed over ASCII letters and numbers: a-z, A-Z and 0-9.
9AFoh, wGRLC, knj9y, ...
- uuid: Uuid4.
de2662a9-fb02-4686-b556-0aca36c0e087
- time: Local time now.
2023-03-04-22-26-42-222655555
- num: Numbers start from
--start
(1 by default).1, 2, 3, ...
- znum: Numbers with left zero padding start from
--start
(1 by default).001, 002, 003, ...
- prefix: Add a prefix string to the file stem, along with a delimiter.
X.jpg => [--with][--delimiter]X.jpg
- append: Append a delimiter and a string after the file stem.
X.jpg => X[--delimiter][--with].jpg
- uppercase: To uppercase.
aBcDe123.txt => ABCDE123.txt
- lowercase: To lowercase.
aBcDe123.txt => abcde123.txt
Note that
Renify will set --indiscriminate false
to make sure that the file stems stay consistent. This means that if you have files with the same stems in the same folder, they'll still look the same even after you rename them. Certainly, you can use --indiscriminate
to treat each file as an independent entity without considering its relationship with other files.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for renify-0.0.7-py3-none-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0165f8446bfcd7b3c5ba014013bcf9067497a37305a988f592738cbb41480cd2 |
|
MD5 | 91af18bc3544264beaaa759541c8b00b |
|
BLAKE2b-256 | 2fb1e7fcf734996966bded0d45974474cbd97a27810a07a5fcccd27563e0f4ff |