CLI Tools
bash
Beginner
Batch File Renamer
Rename multiple files in a directory by replacing a pattern with a new string.
bash
#!/bin/bash
DIR=${1:-.}
FROM=${2}
TO=${3}
for f in "$DIR"/*"$FROM"*; do
new="${f/$FROM/$TO}"
mv -v "$f" "$new"
done
echo Rename complete.
Prerequisites
- bash
Pro Tips
- → Add echo before mv to dry-run.
Commercial Licensing
Acquire a production access token or template license for enterprise deployment.
Module Info
- Language
- bash
- Level
- Beginner
- Read time
- 1 min
- Published
- May 2025
- License
- Commercial License
Newsletter
New modules every week, directly to your inbox.
Similar Modules
Rich Progress Bar Script
Display a beautiful progress bar in the terminal using Rich.
python
·
Beginner
Git Commit Message Enforcer
commit-msg hook that enforces Conventional Commits format.
bash
·
Intermediate
System Info Dashboard
Print a compact system summary: CPU, RAM, disk, OS and uptime in one script.
bash
·
Beginner