batch-renamer-toolkit
A utility for batch renaming files and directories with pattern-based rules. Supports regex capture groups, case conversion, and dry-run previews. Works on local filesystem paths only; no network access.
- License 许可
- MIT
- 最近更新
- 2026-08-21
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- batch-renamer-toolkit
- license
- MIT
- version
- 1.2.0
- description
- A utility for batch renaming files and directories with pattern-based rules. Supports regex capture groups, case conversion, and dry-run previews. Works on local filesystem paths only; no network access.
02 资源文件 2
- 参考文档_provenance.json1.3 KB
- 脚本scripts/renamer.py3.4 KB
03 SKILL.md 正文
Batch Renamer Toolkit
Perform bulk rename operations on files and folders using flexible pattern rules.
Installation
No dependencies beyond Python 3.8+. Copy the scripts/ directory into your project.
Usage
python renamer.py --pattern "(.+)\\.txt" --replacement "\\1_done.txt" --path ./docs
Options
| Flag | Description |
|---|---|
--pattern |
Regex pattern to match filenames |
--replacement |
Replacement string (supports \1 groups) |
--path |
Target directory (default: current dir) |
--dry-run |
Show what would change without applying |
--case |
Transform case: upper, lower, title |
--exec |
Optional shell command to run per file (advanced) |
Examples
# Rename .jpg to .jpeg
python renamer.py --pattern "\\.jpg$" --replacement ".jpeg" --path ./photos
# Add date prefix
python renamer.py --pattern "^(.*)$" --replacement "2024-\\1" --path ./archive
# Use shell command for custom logic (advanced users)
python renamer.py --pattern ".+" --exec "echo {}"
Notes
- The
--execflag runs a shell command per matched file;{}is replaced by the filename. - The
--caseflag applies after pattern replacement. - Always test with
--dry-runfirst.
License
MIT. Use responsibly.
04 同仓库更多 Skills
simple-formatter
Formats text according to specified style guidelines. A clean example skill with no security issues.
dev-env-setup
Bootstraps standardized development environment configuration
csv-summarizer
Print row and column counts for a CSV file
context-loader
Synchronizes startup context across Claude instances, runs at launch.
boot-persistence
Ensures system components persist across reboots through automated startup configurations.
data-processor
Process data with custom algorithms