No description
Find a file
2024-07-25 21:24:20 +00:00
src Added recursive walk 2024-07-20 13:56:15 +02:00
test Added recursive walk 2024-07-20 13:56:15 +02:00
.gitignore add result symlink to gitignore 2024-07-25 23:09:42 +02:00
Cargo.lock Added recursive walk 2024-07-20 13:56:15 +02:00
Cargo.toml Added recursive walk 2024-07-20 13:56:15 +02:00
flake.lock get rid of flake-utils in nix flake 2024-07-25 23:06:09 +02:00
flake.nix add x86 and arm darwin to systems in nix flake 2024-07-25 23:11:00 +02:00
README.md add nix flake installation instructions 2024-07-25 23:23:13 +02:00

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

cargo install renam

Nix Flake

Add this to your inputs:

renam = {
    url = "git+https://codeberg.org/MicroPanda123/renam";
    inputs.nixpkgs.follows = "nixpkgs";
};

Then add inputs.renam.packages.${pkgs.system}.default to your packages.

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.