How to Look Into a File
When you don't know what a file's type is and have no clues about what program works with a file it can sometimes help to look into the file and perhaps find clues in the file contents. Often all you will see will be binary bytes which translate to random characters in most viewers; but now and again you can find some hints within the file.
How you approach looking into a file will depend on what you are looking for.
If all you want to see is what text might be in the file there is a free utility called "Peek" that can help.
Peek installs as an extension to Windows Explorer. To use it you right click on a file name and select Peek from the pop-up menu. Then select the proper file type and Peek extracts text in the file to a temporary file and opens your text editor to view it.
Peek can be obtained from: http://members.ping.at/mlubich/
Please be aware that Peek installation requires some knowledge of directories on your computer. Its installation routine is very basic and requires your help. It also may give erratic results on Windows.
Another trick (from the forum) if you have Microsoft Word is to open Word and then use the menu item File|Open. In the file type menu scroll down to where it says "Recover text from any file (*.*)" and select that item. Then, navigate to the file in question and select it. Word will go through the file and extract the text in it and present it to you as a new document.
More In-Depth Examination
If you want to see the complete file you will need something that is capable of displaying the binary file. One excellent program for display/editing of binary files is the editor EditPad Pro.
EditPad Pro installs as a standalone program. It is an excellent text editor that will also view and edit binary files.
EditPad Pro is shareware; the version you install is a trial version only, if you continue to use it you pay for it.
EditPad Pro is available from: http://www.editpadpro.com/
When you open a binary file in EditPad Pro you see both the binary bytes and the ASCII equivalents (you can set the view options to see only the ASCII equivalents if you wish). If you're lucky, when you do this on an unknown file you can find hints about the file's creator. For example, if someone sends you a .PSPIMAGE file and you open it in EditPad Pro you might see...
Note that right at the top of the .PSPIMAGE file it tells you that the file was created by Paint Shop Pro and is an image file.
Unfortunately, not all files are that easy to figure out. However, if you scroll through the file you just might find a copyright notice or some other indicator of what the file type is.
When looking into files, pay particular attention to the first few characters in the file. There are some standard indicators for various common file types...
- If the first two characters are "BM" the file may be a .BMP bitmap image.
- If the first two characters are "PK" the file may be a .ZIP archive file.
- If the first two characters are "MZ" the file may be an .EXE executable file.
- If the first four characters are "%PDF" the file may be an Adobe .PDF file.
- ...and so on.
As an alternative, the program TrID might be of use to you. This program analyzes a file, looking for known patterns. The patterns are compared with a database of known patterns. If the patterns match (or partially match) the program reports out the probability of the unknown file being of a particular file type. Visit the TrID site to pick up a copy. (There is also an online version of TrID.)
Users in the discussion forum often want to know how to extract game resources from game files. MultiEx Commander is one product that can do this for a number of different game file formats.
If you need to extract information from a formatted data file but don't know the format of the data file you might try using Game Extractor on the file and see what it might find. At least one user in the forum found this handy when attempting to extract data from a data file created by a developer who left no notes behind.
Looking Into EXE, DLL, and Other Executables
While its unwise to attempt to edit an EXE, DLL or any other executable file many of these are compiled with resources as part of the file. You can use a resource viewer/editor to look at these resources and sometimes either extract them or even change them. (Again, changing anything in an executable file can render the entire program unavailable and if you change a system file your entire operating system could fail. Be careful!)
Here are a few resource viewers/editors FILExt is aware of; not all of these are free, nor is this list complete...