Skip to content

Sort files into a target directory containing matches

License

Notifications You must be signed in to change notification settings

raspi/lajittelia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lajittelia

GitHub All Releases GitHub release (latest by date) GitHub tag (latest by date)

Sort files into target directory matching target directory name(s).

Target directory structure example (only directories):

  • "Foo"
  • "Bar"
  • "Quux, Xyzzy"

To be sorted directory (files and directories):

  • Hello foo.txt
    • Will be sorted to "Foo" directory
  • This is xyzzy.md
    • Will be sorted to "Quux, Xyzzy" directory
  • Fooz.ini
    • Will not be sorted because "Fooz" is not "Foo" (word boundary)
  • Foo bar.ini
    • Will not be sorted since it matches two directories "Foo" and "Bar"

Usage

Usage: lajittelia [OPTIONS] --target <TARGET> <PATHS>...

Arguments:
  <PATHS>...  Path(s) to scan for files to be sorted

Options:
  -t, --target <TARGET>  Target directory for sorted files
  -Y, --move-files       Move files? If enabled, files are actually moved
  -h, --help             Print help
  -V, --version          Print version

Example

Sort files in /mnt/nas/not-sorted and /mnt/nas/temp to /mnt/nas/sorted:

lajittelia --move-files --target /mnt/nas/sorted /mnt/nas/not-sorted /mnt/nas/temp