A CLI tool to rename files to randomly generated strings.

Overview

rng-rename

A CLI tool to rename files to randomly generated strings.

Why?

Suppose you downloaded a few hundred images to use as your desktop wallpapers. You have a wallpaper tool that cycles through them, but unfortunately it only supports filename-ordering, whereas you prefer to have the images shuffled.

Well, rng-rename to the rescue! Simply run this tool on all your images and the filename-ordering is completely scrambled.

You can also use this tool for data analysis purposes. A data scientist might want to randomise their dataset before running some analysis, but keep the same ordering over several runs. rng-rename is useful in this case too.

I guess you can say rng-rename is a tool looking for a purpose. Ultimately it is up to you, the user, to give it a one.

Quick Start

# rename `path/to/foo` and `path/to/bar.txt` to randomly generated names
rng-rename path/to/foo path/to/bar.txt

You can expect something like this:

"09c43d3d" "/abs/path/to/bar.txt" -> "67aec57d.txt" Confirm batch? You can proceed(p), skip(s), or halt(h): proceed Renamed 2 files. Done.">
Batch #1/1:
        "/abs/path/to/foo" -> "09c43d3d"
        "/abs/path/to/bar.txt" -> "67aec57d.txt"
Confirm batch? You can proceed(p), skip(s), or halt(h): proceed
Renamed 2 files. Done.

Markdown doesn't show colours, but the real thing does!

rng-rename on Alacritty

There are plenty of various options available. You can for example:

  • Preview using the --dry-run flag
  • Choose which character set to use for random names using the --char-set option
  • Specify the number of random characters using the --length option
  • Choose upper/lower/mixed case where applicable using the --case option
  • Set a prefix and/or a suffix to the randomly generated name using --prefix and --suffix options
  • Choose what to do with the file extension using the --ext-mode option

And more. For full usage, run:

rng-rename --help

Install

from crates.io

rng-rename on crates.io

cargo install rng-rename

from AUR

rng-rename on AUR

# with paru
paru rng-rename

# or with yay
yay rng-rename
You might also like...
Statically verified Rust struct field names as strings.

field Statically verified struct field names as strings. See the documentation for more details. Installation Add the following to your Cargo manifest

A tool that allow you to run SQL-like query on local files instead of database files using the GitQL SDK.
A tool that allow you to run SQL-like query on local files instead of database files using the GitQL SDK.

FileQL - File Query Language FileQL is a tool that allow you to run SQL-like query on local files instead of database files using the GitQL SDK. Sampl

CLI Tool for tagging and organizing files by tags.

wutag 🔱 🏷️ CLI tool for tagging and organizing files by tags. Install If you use arch Linux and have AUR repositories set up you can use your favour

CLI tool to bake your fresh and hot MD files

At least once in your Rust dev lifetime you wanted to make sure all code examples in your markdown files are up-to-date, correct and code is formated, but you couldn't make that done with already existing tools - fear not!

 miniserve - a CLI tool to serve files and dirs over HTTP
miniserve - a CLI tool to serve files and dirs over HTTP

🌟 For when you really just want to serve some files over HTTP right now!

A cli tool to download specific GitHub directories or files

cloneit A cli tool to download specific GitHub directories or files. Installation From git git clone https://github.com/alok8bb/cloneit cd cloneit car

Voila is a domain-specific language launched through CLI tool for operating with files and directories in massive amounts in a fast & reliable way.

Voila is a domain-specific language designed for doing complex operations to folders & files. It is based on a CLI tool, although you can write your V

A CLI tool used for rendering Blender files to a cropped spritesheet

BuilderGenerator A CLI tool used for rendering Blender files to a cropped spritesheet Clients Rust

'apk-yara-checker' is a little CLI tool written in Rust to check Yara rules against a folder of APK files.
'apk-yara-checker' is a little CLI tool written in Rust to check Yara rules against a folder of APK files.

apk-yara-checker 'apk-yara-checker' is a little CLI tool written in Rust to check Yara rules against a folder of APK files. You have to pass the folde

Owner
Not actually a horse
null
Rsre it's tool to rename file/directory

, Rust renamer Rsre it's tool to rename file/directory Zero dependencies ?? Requirements Rust Nightly Install With Cargo # Install nightly rust rustup

Awiteb 6 Dec 22, 2022
Blazingly fast Rust CLI app to sync data from a folder of excel workbooks into generated c# code for unity usage

Extensions supported ( .xls, .xlsx, .xlsm, .xlsb, .xla, .xlam, .ods ) Speed Test Image shows the results of 5000defs synced from 2 workbooks and 5 she

null 4 Feb 16, 2023
Small CLI for escaping and unescaping characters in strings

?? esc Small CLI for escaping characters in strings. Install cargo install esc Usage cat LICENSE-MIT | esc escape | pbcopy pbpaste | esc unescape | pb

Seth 1 Nov 26, 2021
Nushell "extern" definitions for tab completion generated from Fish's

Nushell completions pack This is a system for generating extern defs (tab-completion) in nu. Background The fish shell project has a long, complicated

Scott Boggs 7 Feb 28, 2023
Vim plugin to quickly parse strings into arrays.

butcher Vim plugin to quickly parse strings into arrays. It is painful to write arrays in any programming language, so butcher makes it easy for you.

null 5 Dec 31, 2021
Vari (Väri) is a Rust library for formatting strings with colors and cosmetic stuff to the terminal.

Vari Vari (Väri) is a Rust library for formatting strings with colors and cosmetic stuff to the terminal. Like Rich library for Python. Väri means "co

azur 13 Nov 2, 2022
A small command-line utility for encoding and decoding bech32 strings

A small command-line utility for encoding and decoding bech32 strings.

Charlie Moog 5 Dec 26, 2022
Easy access of struct fields in strings using different/custom pre/postfix: "Hello, {field}" in rust

Easy access to struct fields in strings ?? add strung to the dependencies in the Cargo.toml: [dependencies] strung = "0.1.3" ?? use/import everything

Dekirisu 2 Sep 19, 2022
Immutable strings, in Rust.

Immutable Strings Inspired by the bytes crate, which offers zero-copy byte slices, this crate does the same but for strings. It is backed by standard

Patrick Elsen 202 Apr 6, 2023
Rust parser/validator for Debian version strings

debian version handling in rust This simple crate provides a struct for parsing, validating, manipulating and comparing Debian version strings. It aim

Jelmer Vernooij 2 Jul 8, 2023