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.
| Action | Arguments | What it does |
|---|---|---|
preview | <dir> [strategy] | Prints the planned moves and changes nothing. |
organize | <dir> [strategy] | Moves the files. The strategy defaults to extension. |
help | Prints usage. |
| Strategy | Where files go |
|---|---|
extension | A lowercase directory per extension, such as rs/, with known kinds nested: images/jpg/, documents/pdf/. Files with no extension stay put. |
type | images/, audio/, videos/, archives/ or documents/. Other files stay put. |
date | By modified time, such as 2026/11/. Includes dotfiles. |
size | tiny/ up to 100 KB, then small/, medium/, large/ and huge/. Includes dotfiles. |
Example
lla plugin run file_organizer preview -- ~/project/org extensionDirectory: ~/project/org
Strategy: extension
Summary: 5 files will be organized into 5 directorieslla plugin run file_organizer organize -- ~/project/org extension
lla -t ~/project/orgSuccess: 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.rsMakefile 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| Key | Effect |
|---|---|
enabled | false turns a strategy off, and it reports No files to organize. |
create_nested | false gives pdf/ in place of documents/pdf/. |
group_by | year, month or day. |
type_strategy.categories | Maps a directory name to the extensions it collects. Your list replaces the defaults. |
size.ranges | Names 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.