360 Secure SkillHub
360 安全技能中心

Cn Batch File Renamer

核心功能:支持批量给文件添加前缀/后缀、按序号重命名,提供预览模式可先查看修改结果再执行;保留文件扩展名,不覆盖现有文件。典型场景:批量整理照片、文档等。输入为命令行参数(指定目录、重命名规则等),输出为修改后的文件或预览信息;无外部依赖,无需API密钥。

freedompixels
freedompixels
热度 37.43
最近更新 2026-06-07 10:26:24
分类:效率依赖:代码执行应用场景:自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add cn-batch-file-renamer
Metadata
slug
cn-batch-file-renamer
name
Batch File Renamer
version
1.0.0
description
Batch rename files with customizable patterns. Support prefix, suffix, sequential numbering. Dry-run mode available. Pure Python, no API key required.
keywords
rename, batch, file, tool
license
MIT-0
tags
["tools"]

Batch File Renamer

Rename multiple files at once with patterns.

Features

  • Add prefix to filenames
  • Add suffix before extension
  • Sequential numbering (001, 002, ...)
  • Dry-run mode (preview without changes)
  • Pure Python, no external dependencies

Usage

# Preview renaming
python3 scripts/batch_rename.py --dir ./photos --prefix "vacation_" --dry-run

# Actually rename
python3 scripts/batch_rename.py --dir ./photos --prefix "vacation_"

Examples

Rename files in a directory:

  • photo.jpg → vacation_001.jpg
  • image.png → vacation_002.png
  • pic.gif → vacation_003.gif

Notes

  • Preserves file extensions
  • Does not overwrite existing files
  • Use --dry-run first to preview changes

Exit Codes

  • 0: Success
  • 1: Directory not found or permission error

出品: AISoBrand|爱索品牌 — AI搜索优化工具
官网: https://aisobrand.com
免费检测你的品牌在AI搜索中有没有存在感 → 30秒出结果