Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/raphico/rename-cli
Bulk file rename
https://github.com/raphico/rename-cli
cli-app esmodules js nodejs
Last synced: 8 days ago
JSON representation
Bulk file rename
- Host: GitHub
- URL: https://github.com/raphico/rename-cli
- Owner: Raphico
- License: mit
- Created: 2024-11-04T22:57:04.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-04T23:11:53.000Z (2 months ago)
- Last Synced: 2024-11-04T23:31:04.042Z (2 months ago)
- Topics: cli-app, esmodules, js, nodejs
- Language: JavaScript
- Homepage:
- Size: 0 Bytes
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bulk File rename
A command-line tool for bulk renaming files based on patterns, dates, and file type
## Features
- **Pattern-Based Renaming:** Rename files by specifying search and replacement patterns.
- **Date-Based Renaming:** Rename files using their creation dates.
- **File-type-Based Renaming:** Rename only files with specified file type
- **Undo Functionality:** Easily revert the last renaming operation.
- **Dry Run Mode:** Preview changes before applying them.## Installation
1. Clone repository
```bash
git clone [email protected]:Raphico/rename-cli.git
cd rename-cli
```2. Install dependencies
```bash
npm install
```3. Create symlink
```bash
npm link
```## Usage
```bash
bfr --help
```## Command
| Command | Description | Example |
| ----------------------------- | ------------------------------------------------------ | --------------------------------------------------- |
| `rename` | Rename files in a specified directory. | `bfr rename --pattern "IMG_" --replace "Vacation_"` |
| `undo` | Revert the last rename operation. | `bfr undo` |
| `-p, --pattern ` | Search pattern to match in filenames for renaming. | `--pattern "IMG_"` |
| `-r, --replace ` | String to replace the search pattern with. | `--replace "Vacation_"` |
| `--date-created` | Rename files based on their creation date. | `--date-created` |
| `--date-format ` | Specify the date format (e.g., "YYYY-MM-DD"). | `--date-format "YYYY-MM-DD"` |
| `-s, --sequence` | Add sequential numbers to renamed files. | `--sequence` |
| `-d, --directory ` | Directory containing files to rename. | `--directory "/path/to/photos"` |
| `-f, --file-type ` | Limit renaming to a specific file type (e.g., ".jpg"). | `--file-type ".jpg"` |
| `--dry-run` | Preview renaming changes without applying them. | `--dry-run` |