#rename #cli-tool #batch #folders #symlink #renamer #methods

bin+lib renify

A simple cli tool for batch renaming files and folders, written in Rust

2 unstable releases

0.1.0 Feb 26, 2024
0.0.7 Feb 3, 2024
0.0.2 Jan 24, 2024

#1102 in Command line utilities

Download history 7/week @ 2024-01-24 19/week @ 2024-01-31 83/week @ 2024-02-21 113/week @ 2024-02-28 23/week @ 2024-03-06

138 downloads per month

MIT license

4MB
903 lines

Renify

A simple cli tool for batch renaming files and folders, written in Rust.

  • πŸš€ written in Rust, fast.
  • πŸŽ‰ Available on PyPi, install via pip.
  • 🧩 Windows Linux MacOS support.
  • πŸ“” files and folders support.
  • 🎁 7 renaming methods provided.
  • ⚠️ symlinks are unsupported for now!

Example GIF

Installation

pip install renify

Usage

Renaming - 重命名

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

Rolling back - ι€€ε›žδΈŠδΈ€ζ¬‘ζ“δ½œ

You can revert to the previous state of the modifications by using:

renify -i . --roll

Help & options

You can get help from:

renify --help

Methods provided

  • 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

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.

Dependencies

~4–15MB
~149K SLoC