batch-rename
This skill should be used when the user wants to batch rename multiple files at once. It handles various rename patterns including sequential numbering, find/replace, prefix/suffix addition, regular expression matching, extension filtering, and recursive subfolder processing. This skill is triggered when the user mentions "批量重命名", "batch rename", "批量改名", "批量修改文件名", or similar requests for renaming multiple files simultaneously.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/1227323804/batch-rename-1Batch Rename Skill
Purpose
Provides powerful batch file renaming capabilities with multiple pattern support. Rename files with sequential numbers, find/replace text, add prefixes/suffixes, use regex patterns, filter by extension, and process subfolders recursively.
When to Use
Use this skill when user wants to:
- Rename multiple files at once (批量重命名)
- Add sequential numbers to filenames
- Find and replace text in filenames
- Add date prefixes or other prefixes/suffixes
- Use regex patterns for complex renaming
- Filter files by extension before renaming
- Process files in subfolders recursively
Usage Workflow
Step 1: Identify User's Rename Intent
Ask the user (or infer from their request):
- Target directory/folder path
- Rename pattern type:
- Sequential numbering:
photo_{n}.jpg→photo_001.jpg - Find & replace: Replace specific text in filenames
- Add prefix/suffix: Add date or other text
- Regex pattern: For complex transformations
- Sequential numbering:
- File extension filter (optional)
- Whether to process subfolders recursively
Step 2: Construct Rename Command
Use the scripts/batch_rename.py script with appropriate arguments:
# Sequential numbering
python scripts/batch_rename.py --path "C:/folder" --pattern "number" --format "file_{n:03d}" --ext "jpg"
# Find and replace
python scripts/batch_rename.py --path "C:/folder" --pattern "replace" --find "old" --replace "new"
# Add prefix
python scripts/batch_rename.py --path "C:/folder" --pattern "prefix" --prefix "2026-" --ext "*"
# Add suffix
python scripts/batch_rename.py --path "C:/folder" --pattern "suffix" --suffix "_backup" --ext "*.txt"
# Regex pattern
python scripts/batch_rename.py --path "C:/folder" --pattern "regex" --regex "(\d+)" --replace "ID_$1"
# Recursive with extension filter
python scripts/batch_rename.py --path "C:/folder" --pattern "number" --format "doc_{n}" --ext "pdf" --recursive
Step 3: Execute Rename
Run the command. The script will:
- Scan the target directory
- Apply filters (extension, recursive)
- Perform renaming operations
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-1227323804-batch-rename-1": {
"enabled": true,
"auto_update": true
}
}
}