Find the original file extension?

I have changed the file extension in order to hide them (such as .avi or .mp4 to .stg) and forgotten the original extension, how to check the original extension and reconvert them?

4

4 Answers

On Linux and OSX there is a command

file yourfilename

that guesses the file type.

If you're comfortable programming in almost any language, you could write a script and just examine the first few bytes of the files headers and rename as appropriate. Most all video/picture/audio headers are available online.

2

Trid is a useful command line application that identifies a ton of filetypes. Assuming it actually is a file, it should help identify it.

It uses a slightly different strategy from file, and might detect possible filetypes rather than what the magic number of the file says

If you open the file in a HEX editor like HxD you will be able to see the file header on the right hand side, This will give you information about your file type.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like