Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Batch file operations (delete, move, copy, list) with glob patterns. CLI tool for efficient filesystem operations. Zero dependencies.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 4% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 13% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 46% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -9% | 0% |
| case-06 | ✗→✓ | ▲ Improved | -24% | 0% |
> 中文 — batch-file-ops 官方中文版本。
用于使用 glob 通配符模式对文件执行高效批量操作的 CLI 工具。 支持:delete、move、copy、list。零依赖(仅使用 Python 标准库)。
| 操作 | 说明 | |------|------| | delete | 删除符合模式的文件 | | move | 移动符合模式的文件 | | copy | 复制符合模式的文件 | | list | 列出符合模式的文件 |
bashpython batch_file_ops.py <action> <source> [<target>] --pattern "<glob>" [--dry-run] [--recursive]
| 参数 | 说明 | |------|------| | action | delete、move、copy 或 list | | source | 源目录 | | target | 目标目录(仅适用于 move 和 copy) | | --pattern, -p | Glob 通配符模式(例如 *.py、TOOLS_*.py)- 默认值:* | | --dry-run, -n | 仅预览,不应用实际更改 | | --recursive, -r | 在子目录中递归搜索 |
bash# 列出目录中的所有 Python 文件 python batch_file_ops.py list /path/to/directory --pattern "*.py" # 删除所有 .tmp 文件(先使用 dry-run 预览!) python batch_file_ops.py delete /path/to/directory --pattern "*.tmp" --dry-run python batch_file_ops.py delete /path/to/directory --pattern "*.tmp" # 移动文件 python batch_file_ops.py move /source /target --pattern "*.txt" # 复制文件(递归) python batch_file_ops.py copy /source /target --pattern "*.md" --recursive # 模式示例 python batch_file_ops.py delete /path --pattern "TOOLS_*.py" python batch_file_ops.py list /path --pattern "backup_202?-*"
delete 和 move 时,务必先使用 --dry-run 预览pathlib.glob() / pathlib.rglob()Other measured skills in the registry, with their headline benchmark lift.