file-sorter

Crates.iofile-sorter
lib.rsfile-sorter
version1.0.4
created_at2025-10-03 23:45:04.678077+00
updated_at2025-10-07 15:16:36.127084+00
descriptionA utility for sorting files based on file name rules into directories
homepage
repositoryhttps://github.com/austingarrigus/sorter
max_upload_size
id1867340
size13,046
Austin Garrigus (austingarrigus)

documentation

README

Sorter

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.

Usage

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.

Installation

Install with Cargo.

$ cargo install file-sorter
Commit count: 0

cargo fmt