| Crates.io | file-sorter |
| lib.rs | file-sorter |
| version | 1.0.4 |
| created_at | 2025-10-03 23:45:04.678077+00 |
| updated_at | 2025-10-07 15:16:36.127084+00 |
| description | A utility for sorting files based on file name rules into directories |
| homepage | |
| repository | https://github.com/austingarrigus/sorter |
| max_upload_size | |
| id | 1867340 |
| size | 13,046 |
A micro-uitility for sorting files into directories based on their file names. It is useful in situations where you frequently place files in one place, such as when downloading, but you want to move them to a new location afterwards.
Create a .sort file in the directory that you would like to sort.
The sort file format is as follows:
identifying regex -> path/to/destination/directory
another string -> another/destination/directory
Then, run file-sorter in that directory, or with that directory as an argument:
$ file-sorter Downloads
Moving: file with identifying regex.txt -> path/to/destination/directory/file with identifying regex.txt
Moving: another file with identifying regex.md -> another/destination/directory/another file with identifying regex.md
Each line of the sort file is split at the ->, then the whitespace at the beginning and end of both parts is trimmed.
If a destination directory does not exist, it will be created.
If a file is not matched, it will not be touched.
If the .sort file does not exist, the program will crash.
Install with Cargo.
$ cargo install file-sorter