ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

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.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/1227323804/batch-rename-1
Or

Batch 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):

  1. Target directory/folder path
  2. Rename pattern type:
    • Sequential numbering: photo_{n}.jpgphoto_001.jpg
    • Find & replace: Replace specific text in filenames
    • Add prefix/suffix: Add date or other text
    • Regex pattern: For complex transformations
  3. File extension filter (optional)
  4. 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:

  1. Scan the target directory
  2. Apply filters (extension, recursive)
  3. Perform renaming operations

Metadata

Stars4473
Views0
Updated2026-05-01
View Author Profile
AI Skill Finder

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 skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-1227323804-batch-rename-1": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.