Install
openclaw skills install @terrycarter1985/batch-file-renameBatch file renaming utility with pattern matching, regex, sequence numbering, and dry-run preview. Supports prefix/suffix, case conversion, whitespace cleanup, and recursive directory processing.
openclaw skills install @terrycarter1985/batch-file-renameRename multiple files using flexible patterns with safe dry-run preview.
001-file.txt, 002-file.txt)sed/awk# Preview rename with prefix + sequence number
for f in *.txt; do
[ -f "$f" ] || continue
echo "Would rename: $f → photo-001-$f"
done
i=1
for f in *.jpg *.png; do
[ -f "$f" ] || continue
printf -v new "vacation-%03d-%s" "$i" "$f"
echo "Renaming: $f → $new"
mv -- "$f" "$new"
((i++))
done
# Replace spaces with underscores, lowercase everything
for f in *; do
[ -f "$f" ] || continue
new=$(echo "$f" | tr '[:upper:] ' '[:lower:]_' | sed 's/[^a-z0-9._-]/_/g' | sed 's/_\+/_/g')
[ "$f" != "$new" ] && mv -- "$f" "$new" && echo "$f → $new"
done
for f in report-*.pdf; do
[ -f "$f" ] || continue
new="${f#report-}"
mv -- "$f" "$new" && echo "$f → $new"
done
find . -type f -name "*.tmp" | while read -r f; do
dir=$(dirname "$f")
base=$(basename "$f" .tmp)
new="$dir/$base.txt"
mv -- "$f" "$new" && echo "$f → $new"
done
mv with echo "Would rename:" and verify output"$f" not $f (handles spaces and special chars)-- in mv — mv -- "$f" "$new" prevents option injectiontar czf backup.tar.gz *.txt before bulk operationscd ~/Downloads
# Dry run
for f in *; do
[ -f "$f" ] || continue
new=$(echo "$f" | tr '[:upper:] ' '[:lower:]_' | sed 's/[^a-z0-9._-]/_/g')
echo "$f → $new"
done
# After verifying, apply:
for f in *; do
[ -f "$f" ] || continue
new=$(echo "$f" | tr '[:upper:] ' '[:lower:]_' | sed 's/[^a-z0-9._-]/_/g')
[ "$f" != "$new" ] && mv -- "$f" "$new"
done
i=1
for f in IMG_*.JPG; do
[ -f "$f" ] || continue
printf -v new "trip-2026-%03d.JPG" "$i"
mv -- "$f" "$new"
((i++))
done