A command-line tool for detecting and optionally correcting files with incorrect extensions. Very much a work in progress!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Lynne Megido 9a0113d1dc
quick hack to work around non-existent document support ;3
4 days ago
.idea cargo update 7 days ago
src quick hack to work around non-existent document support ;3 4 days ago
.gitignore minor tweaks for what should/shouldn't be included in git/crate 4 days ago
Cargo.lock minor tweaks for what should/shouldn't be included in git/crate 4 days ago
Cargo.toml minor tweaks for what should/shouldn't be included in git/crate 4 days ago
Cross.toml windows support! and other stuff 6 days ago
LICENSE better error handling and pattern matching, added license 3 weeks ago
README.md badges!! 0u0 4 days ago
clippy.sh slightly better readme 4 days ago
rusftmt.toml added rustfmt.toml, ran rustfmt 1 week ago

README.md

fif

Crates.io Crates.io

A command-line tool for detecting and optionally correcting files with incorrect extensions.

Installation

cargo install --locked fif

Usage

See fif --help for more.

The basics

The simplest way to use fif looks like this:

fif -E images ~/Pictures

This command will scan all of the files with extensions used by image files (.jpg, .png, etc) in your ~/Pictures directory.

You can also manually specify a set of extensions to use:

fif -e jpeg,jpg,zip,docx ~/Documents

By default, fif will output a bash script that can be used to fix all the files it found with incorrect file extensions. You might find it useful to output this script to a file (rather than to stdout):

fif -E images ~/Pictures > output.sh