360 Secure SkillHub
360 安全技能中心

Rr Renamer

这是基于RenameRegex的Windows CLI批量重命名轻量包装工具,核心支持正则搜索替换重命名、递归重命名、文件/目录选择。适用于Windows下需批量规范化重命名文件/目录的场景。默认先执行预览(自动加/p参数),需用户明确批准后才实际执行;不默认强制覆盖,且记录所有调用日志。输入为RR参数,通过PowerShell脚本运行,推荐用单引号传递正则参数避免转义。

nextaltair
nextaltair
热度 76.79
最近更新 2026-05-11 17:34:36
分类:自动化依赖:代码执行 / 读写文件应用场景:自动化脚本 / 工作流

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add rr-renamer
Metadata
name
rr-renamer
description
Use RenameRegex (RR.exe) as a generic Windows CLI bulk renamer from OpenClaw. Use when you need regex search/replace renames with preview (/p pretend), recursive renames (/r), files/dirs selection, and a safe preview→apply workflow. This skill provides a thin wrapper and logging; it does NOT define any specific normalization rules.
disable-model-invocation
true

RR (RenameRegex) generic runner

Assumptions

  • RR.exe (RenameRegex) is available on PATH from the environment that runs the command.
    • User stated it is placed in ~/.local/bin.
  • Prefer running via Windows PowerShell 7 (pwsh.exe) so Windows path semantics are authoritative.

Safety defaults

  • Always run pretend preview first (/p).
  • Only run apply after explicit user approval in the chat.
  • Never use /f (force overwrite) unless the user explicitly asks.
  • Log every invocation.

How to use

Use the bundled script to run RR.exe inside a chosen root folder.

  • Preview:
    • provide RR arguments, script adds /p automatically
  • Apply:
    • provide RR arguments, script runs without /p

See: scripts/rr_run.ps1

Regex argument quoting (PowerShell)

When calling from PowerShell, pass regex arguments like \s+ as a single backslash string. Recommended: use single quotes to avoid accidental escaping:

  • @('*', '\s+', '_', '/r', '/e')