Crates.io | group_files_into_dirs |
lib.rs | group_files_into_dirs |
version | 0.2.1 |
source | src |
created_at | 2024-08-10 14:07:41.405428 |
updated_at | 2024-08-14 04:06:25.625301 |
description | Group files into directories based on keywords |
homepage | |
repository | https://github.com/craftgear/group_files_into_dirs |
max_upload_size | |
id | 1332416 |
size | 70,281 |
a CLI tool to group files into directories based on their filenames.
Download binary file from releases page and put it in a path directory.
or using cargo to Install
cargo install group_files_into_dir
or build from source.
git clone https://github.com/craftgear/group_files_into_dirs
cargo build --release
extract keywords from filenames.
delimiters are ,_-
, space
and braces ()[]{}
.
dir
- directory to group files in.group_files_into_dir <dir>
keywords
- words to use for grouping files, comma separated.dir
- directory to group files in.group_files_into_dir -k <keywords> <dir>
Once you've created directories with interactive mode or specific keywords mode, this mode would be your daily driver.
With -d
option, you can group files into directories based on directory names.
Let's say you have inquiry
directory and quote
directory in docs
directory.
Now when you put inquiry_2021-01-01.txt
and quote_2021-01-01.txt
in docs
directory,
you can move them into inquiry
and quote
directories with this mode.
dir
- directory to group files in.group_files_into_dir -d <dir>
# invoke interactive mode (default)
# then ask you to select keywords.
group_files_into_dir ./
# group files in current directory based on keywords "hello" and "world"
# no keyword selection prompt will be shown.
group_files_into_dir -k "hello,world" ./
# now you can occasionally organize files with -d option.
group_files_into_dir -d ./
MIT License