qarmin / czkawka

Multi functional app to find duplicates, empty folders, similar images etc.
Other
19.42k stars 634 forks source link

[Feature Request] Broken Files - Add option to rename files with incorrect file extension #651

Open dnutan opened 2 years ago

dnutan commented 2 years ago

I think it would be a nice feature to be able to correct the file extension on those Broken Files where the file extension does not match the file header signature / magic number (not 100% accurate due to some file formats using container formats). This could work for images, .CHK files, etc. either applying a suggested file extension to all selected files or with a custom file extension (on GUI an extra editable column with suggested extension).

About File Signatures

Some programs that can detect file signatures


Feature Request slightly related to #309

qarmin commented 2 years ago

Most tools are written in C/C++ and similar, so integration can be problematic.

From Rust side, probably something like https://crates.io/crates/mime_guess can be used

dnutan commented 2 years ago

For Rust, maybe something like mime2ext, infer (or tree_magic or tree_magic_mini) would help doing the job. Regards.