Skip to content

tomholford/junk-drawer

Repository files navigation

junk-drawer

image

Got a folder like this? Tidy it up with junk-drawer

Select a directory and the files will automatically be sorted into relevant directories, arranged by filetype.

Prerequisites

Usage

  • -i /path/to/input - (optional) the path of the directory to organize; defaults to ./
  • -o /path/to/output - (optional) the path of the directory to move the organized files to; defaults to ./
  • -d - (optional) dry run mode; shows a preview of move operations. defaults to off

Install

  1. Clone this repo
  2. Run bin/install
  3. Organize a folder
junk-drawer -d -i ~/Downloads

Example

$ junk-drawer sort -d -i ./test -o ./other
sorting ./test ...
found 1 files [txt] out of 1 total paths
moving files ...
other/txt/lol.txt already exists ...
will move as other/txt/1639871946323_lol.txt to avoid overwrite
[dry run] would move test/lol.txt --> other/txt/1639871946323_lol.txt
done :)

Roadmap

  • alternative organization strategies, e.g. by file size or creation date
  • "share my screen" mode that cleans up Desktop automagically
  • undoable transactions
  • auto-rename when conflict, option to force overwrite
  • multiple paths
  • custom rulesets