https://github.com/apapamarkou/batch-rename-cli
Powerful CLI Utility/command to batch (bulk) rename files.
https://github.com/apapamarkou/batch-rename-cli
cli command command-line commands file-management file-utilities file-utility file-utils linux linux-command linux-commands rename rename-files rename-utility renamer shell-command shell-commands unix unix-command unix-commands
Last synced: 6 months ago
JSON representation
Powerful CLI Utility/command to batch (bulk) rename files.
- Host: GitHub
- URL: https://github.com/apapamarkou/batch-rename-cli
- Owner: apapamarkou
- License: gpl-2.0
- Created: 2025-03-17T23:10:56.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-03-17T23:58:09.000Z (11 months ago)
- Last Synced: 2025-03-18T00:27:47.868Z (11 months ago)
- Topics: cli, command, command-line, commands, file-management, file-utilities, file-utility, file-utils, linux, linux-command, linux-commands, rename, rename-files, rename-utility, renamer, shell-command, shell-commands, unix, unix-command, unix-commands
- Language: Python
- Homepage: https://github.com/apapamarkou/batch-rename-cli
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Batch Rename CLI (brn)
A command-line utility for batch renaming files with powerful sorting and formatting options.
## Features
- Rename multiple files at once using patterns and numbering
- Sort files by name, size, or modification date
- Customizable numbering format with padding
- Preserve file extensions
- Simple and intuitive command-line interface
## Installation
### Quick Install/Update (Linux/macOS)
Just copy this line, paste it into a terminal, press enter, done!
```
sudo curl -fsSL https://raw.githubusercontent.com/apapamarkou/batch-rename-cli/main/brn -o /usr/bin/brn && sudo chmod +x /usr/bin/brn
```
### Requirements
- Python 3.x
- Curl
- Linux/Unix-based system
#### Ubuntu/Debian
```
sudo apt update
sudo apt install python3 curl
```
#### Fedora
```
sudo dnf update
sudo dnf install python3 curl
```
#### OpenSUSE
```
sudo zypper refresh
sudo zypper install python3 curl
```
#### Arch Linux
```
sudo pacman -Syu
sudo pacman -S python curl
```
#### CentOS/RHEL
```
sudo yum update
sudo yum install python3 curl
```
#### Alpine Linux
```
sudo apk update
sudo apk add python3 curl
```
## Usage
Basic syntax: `brn [files] [options]`
## Examples
1. Rename all JPG files with sequential numbers:
```
brn *.jpg --count 001
```
2. Rename files sorted by size in descending order:
```
brn *.png --sort-size desc --count 001
```
3. Rename with custom prefix:
```
brn *.txt --prefix document_ --count 01
```
## Options
- --count : Start numbering from specified value (e.g., 001, 01)
- --prefix : Add prefix to filenames
- --sort-size: Sort files by size
- --sort-date: Sort files by modification date
- --sort-name: Sort files by name (default)
- asc/desc: Specify sorting direction (e.g., --sort-size desc)
use brn --help to view more...
## Examples with Output
Before:
```
photo1.jpg
photo2.jpg
photo3.jpg
```
After `brn *.jpg --count 001`:
```
001.jpg
002.jpg
003.jpg
```
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
1. Fork the repository
2. Create your feature branch ( git checkout -b feature/AmazingFeature)
3. Commit your changes ( git commit -m 'Add some AmazingFeature')
4. Push to the branch ( git push origin feature/AmazingFeature)
5. Open a Pull Request
## License
This project is licensed under the GNU General Public License v2.0 - see the LICENSE file for details.
## Author
Andrianos Papamarkou
## Acknowledgments
- Thanks to all contributors who have helped with the development
- Inspired by the need for efficient batch file renaming in the command line
## Support
If you encounter any issues or have questions, please file an issue on the GitHub repository.
## Changelog
#### v1.0.0
- Initial release
- Basic renaming functionality
- Sorting options
- Customizable numbering