Plugin catalog

file_organizer

Moves the top-level files of a directory into subdirectories by extension, type, date or size.

↓ on this page

file_organizer moves the top-level files of a directory into subdirectories by extension, type, date or size. Reach for it when a directory such as ~/Downloads needs a one-off sort. It leaves existing subdirectories alone and adds nothing to listings.

Actions

Run an action with lla plugin run file_organizer <action> -- <args>. Every action is interactive, so it needs a TTY and the default --output human.

ActionArgumentsWhat it does
preview<dir> [strategy]Prints the planned moves and changes nothing.
organize<dir> [strategy]Moves the files. The strategy defaults to extension.
helpPrints usage.
StrategyWhere files go
extensionA lowercase directory per extension, such as rs/, with known kinds nested: images/jpg/, documents/pdf/. Files with no extension stay put.
typeimages/, audio/, videos/, archives/ or documents/. Other files stay put.
dateBy modified time, such as 2026/11/. Includes dotfiles.
sizetiny/ up to 100 KB, then small/, medium/, large/ and huge/. Includes dotfiles.

Example

lla plugin run file_organizer preview -- ~/project/org extension
Directory: ~/project/org
Strategy: extension
Summary: 5 files will be organized into 5 directories
lla plugin run file_organizer organize -- ~/project/org extension
lla -t ~/project/org
Success: Successfully organized files in ~/project/org
└── org/
    ├── Makefile
    ├── audio/
    │   └── mp3/
    │       └── song.mp3
    ├── documents/
    │   ├── md/
    │   │   └── notes.md
    │   └── pdf/
    │       └── report.pdf
    ├── images/
    │   └── jpg/
    │       └── photo.JPG
    ├── keep/
    │   └── inner.txt
    └── rs/
        └── main.rs

Makefile stays because it has no extension, and keep/inner.txt stays because keep/ is a subdirectory.

Settings

The plugin reads ~/.config/lla/plugins/file_organizer/config.toml.

[extension]
enabled = true
create_nested = true
 
[date]
enabled = true
group_by = "month"
 
[type_strategy]
enabled = true
 
[type_strategy.categories]
images = ["jpg", "jpeg", "png", "gif", "svg"]
 
[size]
enabled = true
 
[[size.ranges]]
name = "tiny"
max_bytes = 102400
KeyEffect
enabledfalse turns a strategy off, and it reports No files to organize.
create_nestedfalse gives pdf/ in place of documents/pdf/.
group_byyear, month or day.
type_strategy.categoriesMaps a directory name to the extensions it collects. Your list replaces the defaults.
size.rangesNames each size directory and its upper limit in bytes.

The date.format key and the [ignore] table do nothing in 0.6.6.

Permissions

filesystem = ["read:tree", "write:tree", "delete:selection"]: it creates directories inside the target and moves files into them.