A rust command-line tool that organizes folder files and sub-files to folders by their extension (PDFs → PDFs/, images → Images/, etc.).
You can preview first, then organize, and even undo a run later.
-
Organizes by file type
Moves files into folders based on extension (e.g., PDFs →PDFs/, images →Images/). Unmapped types go toOthers/. -
Preview before changing anything
--plan json|csvshows the full move list via Json or CSV.--dry-runprints exactly what would happen without touching files.
-
No Overwrites
If a name already exists, the tool usesname (1).ext,name (2).ext, etc. -
Undo any real run
Every real run writes a JSON log under<root>/logs/…. Use--undo-log <path>(if you only want to see what will happen, use--dry-run) to move everything back. -
Recursive scanning
Recursively walks subfolders, and skips files that already in the right place. -
Config-driven
Customize destinations inconfig.json(ex"md": "Text","mp4": "Videos"). -
Easy to run
Works with one command viacargo run -- <folder>.
-
Run on a folder
cargo run -- /path/to/folder -
Preview a plan (no changes)
cargo run -- /path/to/folder --plan json
cargo run -- /path/to/folder --plan csv -
Dry-run (no changes)
cargo run -- /path/to/folder --dry-run -
Undo using a log file (folder is ignored in undo mode)
cargo run -- /any/folder --undo-log /path/to/log.json
cargo run -- /any/folder --undo-log /path/to/log.json --dry-run
Extensions can be mapped via the configuration file. Below is an example:
{
"pdf": "PDFs",
"jpg": "Images",
"jpeg": "Images",
"png": "Images",
"pptx": "Slides"
}-
No overwrites If file abc.pdf exists, it becomes abc (1).pdf, then (2), etc.
-
Undo is safe. It restores in reverse order and also avoids overwriting.