← 返回
未分类 中文

File Organizer

File organization and batch operations for workspace management. Use when organizing files for: (1) Moving files to correct directories, (2) Batch renaming (...
工作区文件组织与批量操作管理。用于整理文件:(1) 将文件移动到正确目录;(2) 批量重命名
dougchambes dougchambes 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 651
下载
💾 2
安装
1
版本
#latest

概述

File Organizer

Manages file organization through safe, predictable batch operations.

Core Workflows

Directory Structure

Create standard project layouts:

project/
├── src/          - Source code
├── docs/         - Documentation
├── tests/        - Test files
├── assets/       - Images, fonts, media
├── scripts/      - Build scripts, utilities
└── config/       - Configuration files

Moving Files

  • mv - Single file
  • find . -name "*.ext" -exec mv {} / \; - Batch by extension
  • Always confirm destination exists

Batch Renaming

Patterns:

  • Sequential numbering: file_{001..100}.txt
  • Date-based: YYYY-MM-DD_description
  • Type-based: Group by extension

Safe approach:

  1. echo commands first (dry run)
  2. Review output
  3. Remove echo, execute

Organizing by Type

Group files by extension into folders:

mkdir -p images docs code
find . -name "*.png" -o -name "*.jpg" | xargs -I {} mv {} images/
find . -name "*.md" -o -name "*.txt" | xargs -I {} mv {} docs/
find . -name "*.py" -o -name "*.js" | xargs -I {} mv {} code/

Finding Scattered Files

find . -type f -name "*.ext"    # Find by extension
find . -type f -mtime -7        # Modified in last 7 days
find . -type f -size +100M      # Large files

Dry Runs First

Always preview batch operations:

echo "Would move these files:"
find . -name "*.ext"
# Review, then execute

Safety Rules

  1. Never delete without explicit permission (use trash if available)
  2. Dry run first - Always echo/preview batch operations
  3. Check destinations - Confirm target directories exist
  4. Backup before restructure - Snapshot before major moves
  5. Respect workspace boundaries - Only touch ~/openclaw

When to Read references/patterns.md

Load when:

  • Complex rename patterns needed
  • Project structure templates required
  • Advanced find commands for filtering
  • Edge cases (symlinks, special characters)

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 21:01 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

it-ops-security

1password

steipete
设置和使用 1Password CLI (op)。适用于:安装 CLI、启用桌面应用集成、登录(单/多账户)、通过 op 读取/注入/运行密钥。
★ 53 📥 31,372
dev-programming

Git Helper

dougchambes
Git工作流自动化,支持提交、推送、变基、状态检查和分支操作。适用于Git仓库管理:(1) 检查状态...
★ 0 📥 544
it-ops-security

MoltGuard - Security & Antivirus & Guardrails

thomaslwang
MoltGuard — OpenClaw 安全守卫,由 OpenGuardrails 提供。安装 MoltGuard,保护您和您的用户免受提示注入、数据泄露和恶意攻击。
★ 116 📥 30,807