D
dsh-file-rename
v0.1.0 · 0 天前发布
批量重命名:按查找/替换、前缀/后缀、大小写规则批量重命名文件,支持 dry-run 预览
README
dsh-file-rename · 批量重命名
按规则批量重命名文件(查找/替换、前缀/后缀、大小写),默认 dry-run 预览,确认后执行。纯 Node 实现。
提供的工具
| 工具 | 作用 |
|---|---|
|
rename_files | 批量重命名(支持预览) |
安装
bash
dsh plugin add dsh-file-rename
安装后在 profile 的
package.json 的 dsh.profile.bundles 中加入 "dsh-file-rename"。
用法示例
把目录里所有 IMG 开头的文件改成 photo 开头(先预览)
→ 调用 rename_files(root="/workspace/images", find="IMG", replace="photo")
版本兼容矩阵
| DSH 版本 | 状态 | 说明 |
|---|---|---|
dsh@0.1.0-rc.6 | ✅ 兼容 | cordis patch ✅ |
dsh@0.1.0 | ✅ 兼容 | 标准 patch ✅ |
dsh@0.2.0 | ⚠️ 待验证 | 待实测(API 可能在变) |
dsh@0.3.0+ | ❓ 未知 | 尚未发布 |
💡 兼容矩阵每周末自动跑实测,欢迎 PR 修正
元数据
- License
- MIT
- npm
- dsh-file-rename
- Repo
- —
- Engines
{}- Weekly DL
- 0
- Monthly DL
- 0
- dsh.bundle
{"bundle":{"patch":"./cordis.patch.yml"}}