← 返回
内容创作 中文

Local File Processor

Process local files with batch rename, format conversion, organization by date/type/metadata, duplicate detection, and metadata read/write/removal.
处理本地文件,支持批量重命名、格式转换、按日期/类型/元数据整理、重复检测及元数据读取/写入/删除。
ppopen
内容创作 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 700
下载
💾 15
安装
1
版本
#latest

概述

local-file-processor

Process local files with common operations: batch rename, format conversion, organization, duplicate detection, and metadata management.

Installation

brew install exiftool imagemagick ffmpeg
chmod +x ~/.openclaw/workspace/skills/local-file-processor/local-file-processor

Global Safety Flags

These flags work for all commands:

  • --dry-run — Preview changes, no files modified/deleted
  • --overwrite — Allow replacing existing target files (default is no overwrite)
  • --force — Skip confirmation prompts for destructive actions
  • --verbose — Verbose output

Commands

rename

local-file-processor rename <pattern> <replacement> [--dir <path>] [--recursive]

Examples:

local-file-processor rename "IMG_" "Photo_" --dir ~/Pictures --dry-run
local-file-processor rename "old" "new" --dir ~/Files
local-file-processor rename "*.jpg" "vacation_{seq}.jpg" --dir ~/Photos

Special replacement tokens:

  • {seq} sequence number (001, 002, ...)
  • {date} current date (YYYY-MM-DD)
  • {time} current time (HH-MM-SS)

convert

local-file-processor convert <format> --input <path-or-glob> [--output <dir>] [--quality <1-100>]

Examples:

local-file-processor convert jpg --input "~/Photos/*.png" --dry-run
local-file-processor convert mp3 --input "~/Audio/*.wav" --output ~/converted
local-file-processor convert mp4 --input ./clip.mov --overwrite

Supported formats:

  • Images: jpg, jpeg, png, gif, webp, tiff, bmp
  • Audio: mp3, m4a, wav, flac, aac, ogg
  • Video: mp4, mov, avi, mkv, webm

organize

local-file-processor organize <date|type|metadata> [--dir <path>] [--key <metadataTag>]

Examples:

local-file-processor organize date --dir ~/Downloads --dry-run
local-file-processor organize type --dir ~/Documents
local-file-processor organize metadata --dir ~/Photos --key Model

Notes:

  • metadata strategy requires --key.
  • Metadata-derived folder names are sanitized to prevent traversal/unsafe paths.

duplicates

local-file-processor duplicates [--dir <path>] [--recursive] [--action list|delete|move] [--dest <dir>]

Examples:

local-file-processor duplicates --dir ~/Downloads
local-file-processor duplicates --dir ~/Files --action delete --dry-run
local-file-processor duplicates --dir ~/Files --action delete --force
local-file-processor duplicates --dir ~/Photos --action move --dest ~/Duplicates

Notes:

  • delete asks for confirmation unless --force is used.
  • move requires --dest.

metadata

local-file-processor metadata <file-or-glob> [--get <key> | --set <k=v>... | --remove <key>... | --all]

Examples:

local-file-processor metadata photo.jpg --get DateTimeOriginal
local-file-processor metadata "~/Photos/*.jpg" --set "Artist=Jane Doe" --dry-run
local-file-processor metadata photo.jpg --remove Copyright --force

Notes:

  • Metadata keys are validated (safe charset only).
  • Write/delete metadata operations require confirmation unless --force.

Safety Model

  • No overwrite by default for move/convert operations.
  • Use --overwrite to explicitly replace existing files.
  • Destructive operations require confirmation unless --force.
  • --dry-run works for all write/delete operations.
  • File scanning uses null-delimited handling for safer filenames.

Troubleshooting

Missing exiftool

brew install exiftool

Missing convert (ImageMagick)

brew install imagemagick

Missing ffmpeg

brew install ffmpeg

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 15:19 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

Humanizer

biostartechnology
消除AI写作痕迹,使文本更自然真实。基于维基百科"AI写作特征"指南,识别并修正夸张象征、宣传用语、肤浅-ing分析、模糊归因、破折号滥用、三项排比、AI词汇、负面平行结构及冗长连接词等模式。
★ 857 📥 199,353
content-creation

AdMapix

fly0pants
广告情报与应用数据分析助手,支持搜索广告素材、分析应用排名、下载量、收入及市场洞察,用于广告素材和竞品分析。
★ 295 📥 136,421
content-creation

Baidu Wenku AIPPT

ide-rea
使用百度文库 AI 智能生成 PPT,自动根据内容选择模板。
★ 66 📥 46,136