nbir 1.1.1

Numeric Bulk File Renamer (NBIR): rename files to a sequential scheme (e.g. base01.jpg, base02.pdf). Select by extension, specific files, or both. All file types.
nbir-1.1.1 is not a library.

NBIR — Numeric Bulk File Renamer

Rename files in a directory to a sequential numbered scheme (e.g. base01.jpg, base02.pdf). Supports all file types. You can select by extension (all .jpg, .pdf, etc.), by specific filenames, or both—e.g. all images plus one or two PDFs.

Installation

From crates.io:

cargo install nbir

From source:

git clone https://github.com/yourusername/simplebulkfilerenamer
cd simplebulkfilerenamer
cargo install --path .

Usage

List only (no renaming): See what’s in a directory, grouped by extension:

nbir --list
nbir -l -d /path/to/folder

Interactive mode (no args): Run nbir with no options. It will ask:

  1. “Do you want to run it in the current directory? (y/n)”
  2. Show files by extension, then: “Extensions to include (comma-separated, or 'all'/'whole' for whole directory)”
  3. “Specific files to add (comma-separated, or leave empty)” — skipped if you chose whole directory in step 2
  4. “Enter base name (e.g., spacewallpaper)”
  5. Preview and “Proceed with renaming? (y/n)”

For whole directory in step 2, answer all, whole, whole dir, or entire (case-insensitive). You then skip the “Specific files” prompt and go straight to base name.

CLI mode: Use -b for base name and -e / -f / --all to choose which files to rename:

nbir [OPTIONS] [--base-name <NAME>]

Options

Short Long Default Description
-b --base-name Base name for renamed files. If omitted, prompts interactively.
-d --directory . Directory to work in
-l --list List files grouped by extension, then exit
--all Include all files (ignores -e and -f)
-e --ext Include all files with these extensions (e.g. -e jpg,png or -e jpg -e pdf). Case-insensitive.
-f --files Include these specific filenames (e.g. -f doc.pdf -f readme.txt)
-y --yes false Skip confirmation; rename immediately

If you pass -b but neither -e, -f, nor --all, all files in the directory are selected.

Examples

List what’s in the current directory:

nbir -l

All files of certain extensions:

nbir -b docs -e pdf,docx
nbir -b imgs -e jpg -e png -e gif

Only a few specific files:

nbir -b out -f report.pdf -f notes.txt

Both: all of one extension plus a couple of another:

nbir -b batch -e jpg,png -f cover.pdf -f readme.txt

All files in the directory:

nbir -b batch --all

Interactive (prompts for extensions, specific files, and base name):

nbir