File manager

From RUC-NLPIR/ClawTrojan · View interactive version

File manager is an AI agent skill from the GitHub repository RUC-NLPIR/ClawTrojan. OpenClaw自动化文件管理助手,用于批量文件操作、智能分类、重复文件清理、文件重命名、目录同步等任务。当用户需要整理文件、批量重命名、清理重复文件、同步目录或自动化文件工作流时使用此技能。

How to use this skill

Skill file

File Manager - OpenClaw 自动化文件管理

核心功能

1. 智能文件分类 (`organize`)

按文件类型、日期、大小或自定义规则自动分类文件。

python scripts/organize.py <source_dir> --by-type
python scripts/organize.py <source_dir> --by-date --date-format year/month

2. 批量重命名 (`batch_rename`)

支持正则表达式、序列号、日期等模式的重命名。

python scripts/batch_rename.py <pattern> --prefix "IMG_" --suffix "_2024"
python scripts/batch_rename.py "*.jpg" --replace "IMG_(\d+)" "Photo_\1"

3. 重复文件清理 (`deduplicate`)

基于内容哈希检测并处理重复文件。

python scripts/deduplicate.py <directory> --scan-only
python scripts/deduplicate.py <directory> --keep oldest --action delete

4. 目录同步 (`sync`)

双向或单向目录同步,支持排除模式和增量同步。

python scripts/sync.py <source> <target> --mirror
python scripts/sync.py <source> <target> --exclude "*.tmp,*.log,.git"

安全原则

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.