Answer the question
In order to leave comments, you need to log in
How to automatically fix file extensions based on their content?
Hello, I have a set of files (videos, pictures, etc.) some of which have incorrect extensions, such as *.png for JPEG files, etc.
I myself came up with a not very convenient "crutch" in the form of selecting all files and mass renaming in "double commander":
Disadvantages:
➖ All files are renamed, even with correct names.
➖ Files like *.ion are renamed
➖ No log
➖ Then you have to rename again, cutting out part of the extension
I would like to:
Have some kind of console utility that scans a directory when it starts, then displays a list of files without an extension or with an incorrect extension. Then displays the dialog "rename? n / n" and would change the names of the files.
Perhaps such software already exists, perhaps it’s easy to write it yourself (which I don’t know how to do, but I think I can do it). I will be glad for any hint.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question