File Organizer

Organizes files in directories using various strategies

LLA File Organizer Plugin

Organize files by extension, date, type, or size. Preview changes before applying.

Features

  • Strategies: extension, date, type, size
  • Preview mode
  • Ignore patterns
  • Color-coded output
  • Smart type detection

Usage

# Organize using default strategy (extension)
lla plugin --name file_organizer --action organize --args /path/to/dir
 
# Organize using specific strategy
lla plugin --name file_organizer --action organize --args /path/to/dir extension
lla plugin --name file_organizer --action organize --args /path/to/dir date
lla plugin --name file_organizer --action organize --args /path/to/dir type
lla plugin --name file_organizer --action organize --args /path/to/dir size
 
# Preview changes before organizing
lla plugin --name file_organizer --action preview --args /path/to/dir extension
 
# Show help and available options
lla plugin --name file_organizer --action help

Configuration

Config file: ~/.config/lla/file_organizer/config.toml

[colors]
success = "bright_green"
info = "bright_blue"
error = "bright_red"
path = "bright_yellow"
 
[extension]
enabled = true
create_nested = true
 
[date]
enabled = true
format = "%Y/%m/%d"
group_by = "month"
 
[type_strategy]
enabled = true
categories = {
    "documents" = ["pdf", "doc", "docx", "txt"],
    "images" = ["jpg", "png", "gif", "svg"],
    "videos" = ["mp4", "mov", "avi"],
    "audio" = ["mp3", "wav", "flac"]
}
 
[size]
enabled = true
ranges = [
    { name = "tiny", max_bytes = 102400 },
    { name = "small", max_bytes = 1048576 },
    { name = "medium", max_bytes = 104857600 },
    { name = "large", max_bytes = 1073741824 },
    { name = "huge" }
]

Display Examples

Preview mode:

📦 File Organization Preview
══════════════════════════════
Directory: /path/to/dir
Strategy: extension
══════════════════════════════
 
📁 images/jpg
 photo.jpg
 screenshot.jpg
 
📁 documents/pdf
 report.pdf
 invoice.pdf
 
══════════════════════════════
Summary: 4 files to organize
══════════════════════════════

Result view:

📦 Organization Complete
══════════════════════════════
 Moved 2 files to images/jpg
 Moved 2 files to documents/pdf
══════════════════════════════
Total: 4 files organized