Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
dnutan opened this issue Mar 20, 2022 · 2 comments · Fixed by #1364
Closed
Labels
enhancement New feature or request

Comments

@dnutan
Copy link

dnutan commented Mar 20, 2022

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

  • TrID
  • file command (based on libmagic library) (GNU/Linux)
  • exiftool (for images, can also extract metadata useful to rename filename by date or other fields)
  • DROID
  • Windows PowerShell (Get-FileMetaData -Signature)
  • File Carving and File Recovery software

Feature Request slightly related to #309

@qarmin
Copy link
Owner

qarmin commented Apr 2, 2022

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
Copy link
Author

dnutan commented Apr 4, 2022

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

@qarmin qarmin added the enhancement New feature or request label May 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants