Automatically organize, analyze, and clean up your file system using natural language commands.
✅ Use this skill when:
❌ Don't use when:
python3 ~/.openclaw/workspace/smartfolder/scripts/smartfolder.py --version
# Organize Downloads folder
python3 ~/.openclaw/workspace/smartfolder/scripts/smartfolder.py organize ~/Downloads
# Find duplicates
python3 ~/.openclaw/workspace/smartfolder/scripts/smartfolder.py duplicates ~/Documents
# Analyze disk usage
python3 ~/.openclaw/workspace/smartfolder/scripts/smartfolder.py analyze ~/
Organize files in a directory.
python3 ~/.openclaw/workspace/smartfolder/scripts/smartfolder.py organize <path> [options]
Options:
--by-type Organize by file type (default)
--by-date Organize by modification date
--by-size Organize by size ranges
--dry-run Preview changes without executing
--target-dir Custom target directory
Find and manage duplicate files.
python3 ~/.openclaw/workspace/smartfolder/scripts/smartfolder.py duplicates <path> [options]
Options:
--delete Delete duplicates (prompts for confirmation)
--move-to Move duplicates to specified folder
--similar-images Include visually similar images
Analyze disk usage.
python3 ~/.openclaw/workspace/smartfolder/scripts/smartfolder.py analyze <path> [options]
Options:
--top N Show top N largest files (default: 20)
--older-than DAYS Find files older than N days
--output-format json, table, or chart
Bulk rename files.
python3 ~/.openclaw/workspace/smartfolder/scripts/smartfolder.py rename <path> [options]
Options:
--by-date-taken Rename photos by EXIF date
--pattern Pattern for renaming
--sequential Add sequential numbers
# Preview changes first
python3 ~/.openclaw/workspace/smartfolder/scripts/smartfolder.py organize ~/Downloads --dry-run
# Execute organization
python3 ~/.openclaw/workspace/smartfolder/scripts/smartfolder.py organize ~/Downloads
Result:
Downloads/
├── Documents/
│ ├── report.pdf
│ └── invoice.docx
├── Images/
│ ├── screenshot.png
│ └── photo.jpg
├── Archives/
│ └── backup.zip
└── Misc/
└── readme.txt
# Find duplicates in Documents
python3 ~/.openclaw/workspace/smartfolder/scripts/smartfolder.py duplicates ~/Documents
# Move duplicates to review folder
python3 ~/.openclaw/workspace/smartfolder/scripts/smartfolder.py duplicates ~/Documents --move-to ~/Duplicates_Review
# Find what's taking space
python3 ~/.openclaw/workspace/smartfolder/scripts/smartfolder.py analyze ~/ --top 10
Output:
Top 10 Largest Files:
1. ~/Videos/project.mp4 2.3 GB
2. ~/Downloads/backup.zip 1.1 GB
3. ~/Documents/archive.pst 890 MB
...
Create ~/.smartfolder/config.json for default settings:
{
"default_organization": "by-type",
"categories": {
"Documents": [".pdf", ".doc", ".docx", ".txt", ".md"],
"Images": [".jpg", ".jpeg", ".png", ".gif", ".bmp"],
"Videos": [".mp4", ".avi", ".mov", ".mkv"],
"Audio": [".mp3", ".wav", ".flac", ".aac"],
"Archives": [".zip", ".rar", ".7z", ".tar.gz"],
"Code": [".py", ".js", ".html", ".css", ".json"]
},
"duplicate_check": {
"min_size": 1024,
"skip_hidden": true
}
}
# Install dependencies
pip install -r ~/.openclaw/workspace/smartfolder/requirements.txt
# Verify installation
python3 ~/.openclaw/workspace/smartfolder/scripts/smartfolder.py --version
Run with appropriate permissions for the target directory.
For directories with 10,000+ files, use --batch-size option.
Files with special characters are handled safely with proper escaping.
MIT License - See LICENSE file
Contributions welcome! Please submit issues and PRs to the GitHub repository.
共 1 个版本