Crates.io | batch_rename |
lib.rs | batch_rename |
version | 0.1.5 |
source | src |
created_at | 2023-03-30 09:32:42.184928 |
updated_at | 2023-03-31 16:08:48.686645 |
description | A simple command line tool for batch rename files. |
homepage | |
repository | https://github.com/quyc07/batch-rename |
max_upload_size | |
id | 824921 |
size | 13,863 |
A command line tool for batch renaming files in a directory.
To install this tool using cargo, run the following command in your terminal:
cargo install batch_rename
Make sure you have Rust and Cargo installed on your system before running this command.
To use batch_rename
, run the command followed by the desired options:
br [OPTIONS]
--path <path>
: The path to the directory containing the files to rename.--prefix <prefix>
: The prefix to add to the file names.--postfix <postfix>
: The postfix to add to the file names.--replace <old> <new>
: Replace the old string in the file names with the new string.--new <name>
: Use a new name for the files, with a number appended to each file name.--help
: Print this help message.Add a prefix "new_" to all files in the directory "/path/to/directory":
br --path /path/to/directory --prefix new_
Replace all occurrences of "old" with "new" in the file names of the directory "/path/to/directory":
br --path /path/to/directory --replace old new
Use a new name "file" for all files in the directory "/path/to/directory", with a number appended to each file name:
br --path /path/to/directory --new file