3 releases (breaking)

0.3.0 Jul 20, 2024
0.2.0 Jul 19, 2024
0.1.0 Jul 18, 2024

#1203 in Command line utilities

Download history 28/week @ 2024-07-27 32/week @ 2024-09-14 15/week @ 2024-09-21 25/week @ 2024-09-28

77 downloads per month

GPL-3.0-or-later

7KB
88 lines

Renam

Blazingly fast file renaming utility with regex.

Why

  1. just for fun justforfunnoreally.dev badge
  2. It's faster than linux 'rename' utility
  3. It supports large amounts of files, unlike 'rename'

Installation

cargo install renam

Usage

renam "regex pattern" "replacement" [optional folder]

Example: Folder contains files named:

  • 1-x.img
  • 2-x.img
  • 3-x.img

To turn x into z: renam "x" "z"

By default renam renames files in current directory. Directory can be specified at the end: renam "x" "z" "path/to/folder"

If you want to see which files were changed, you can use -v flag, and if you want to also see all files that were not renamed, use -vv

If you only want to see what changes will happen, but not actually commit them, use -d (with -v/-vv flag)

You can also rename files recursively using -r flag, and specify max depth of it using --max-depth.

Changelog

0.3.0

Added

  • Recursive renaming with flag
  • Max depth of recursive renaming

0.2.0

Added

  • Added verbose flag, which allows printing out which files are changed (or were left unchanged if used -vv)
  • Added dry run flag, which causes program to not actually rename files, useful with verbose flag

Aknowledgements

Dedications to renamer (I wanted to call my project that but this was first lol) which seems better (has incrementing which I do not plan to include) but from my benchmarks slightly slower, and to rename which is also slower :3

And to other similar projects.

Dependencies

~3–11MB
~124K SLoC