Finding the file format


I have a file which dosen't have any extension [someone removed the extension of the file from my system] I need to find out what kind of file is that. Is there any software avaliable to do that?

Please help me.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Irwin SantosComputer Integration SpecialistCommented:
the best is to guess..

What kind of file do you THINK it is?

.jpg, .jpeg, .gif

Adobe Acrobat?

Microsoft product?
.doc, .xls

How about making it an .txt and then open it up in Notepad.... read some of the info, and report back what it is.. better yet post some content of what you can read.
venishjoeAuthor Commented:
The file is big, around 250MB so I thought it would be a media file and tried opening the file in most media players and it never worked. I also tried with the common file formats which we normally use and it came under nothing. Also when I try to open the file in editor, the editor crashes.

So I thought there should be some software around there by which I can find the file type.

venishjoeAuthor Commented:
I opened the file in MS Word and I got the following readable text

 $Info: This file is packed with the UPX executable packer $
 $Id: UPX 1.01 Copyright (C) 1996-2000 the UPX Team. All Rights Reserved. $

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

Irwin SantosComputer Integration SpecialistCommented:

It's a compressed file that you need to upack with the above utility UPX.... did you download something large recently?
venishjoeAuthor Commented:
Yes, this was a downladed file and supposed to be a software. I downloaded UPX from and tried to decompress the file but I am getting a messgae stating This file is not compressed with UPX.

Irwin SantosComputer Integration SpecialistCommented:
what's the name of the file?
Maybe UPX can't unpack it because it wants to see a UPX extension. Try adding that and see if it works
You definitely are seeing a FILE rather than a SHORTCUT here?
Windows will ALWAYS hide the extensions of files with the following extensions:
LNK - windows shortcut
PIF - DOS Shortcut
SCF - Windows Explorer Command
URL - Internet Link
SHB - Shortcut into a document
SHS - Scrap Object
And possibly will hide extensions of file types like Visual Basic Script, Windows Script, etc.

You are definitely also seeing the extensions of ALL file types?
Start Menu > Settings > Folder Options > View tab > show ALL files, and untick "hide extensions of know file types".

RIGHT-Click on the unknown file and choose "Properties".  Go to the "Version" tab if there is one, and see what it says under File Version, Description, and the set fields like "Original File Name".  Most 32-bit (Windows) .exe and .dll files will have a 2version" tab that can yield some details of the file so you can get some idea about what it was intended for and what the original name was.

UPX is used to compress executable files, dll's, etc, etc to make them smaller while retaining full functionality with the original file extension.  A file compressed this way is also harder to modify or steal the code. UPX isn't like WinZip, WinRAR, PKZIP, etc in that it creates a container into which it compresses one or more files, and renames the container as a zip, or other zipped file type.  UPX is primarily intended for compressing single files to make them more easily distributable in their program package, or to allow them all to be fitted onto portable media where they otherwise may not all fit.  When UPX is used on a file, it retains the original file name, unless of course a developer subsequently decided to rename it after packing it.

UPX Version 1.25 comes as a 32-bit Windows "console" version:

or as a 32-bit DOS version:

Both are capable of packing and unpacking the following file types:

Windows 32-bit *.exe or *.dll
DOS *.com, *.exe, and *.sys
And a load of other file types generated from applications for other operating systems like Linux.

So, as long as you know for certain that the file was intended for use in Windows or DOS, rather than for some other OS, then you could try renaming it to any of the above extensions.  If it is a Windows (32-bit) *.EXE file, then it is highly likely to have its own icon.  If you rename the file to an .exe file, and see the icon change to a distinctly different one, then you most likely have found the original extension.

What was this file SUPPOSED to be for?
Unless you know what you are doing, you can mess up your system trying to open or run unknown files or introducing them to your system.

Dowload the following program file:

Unzip it with Winzip or other program until you have PEEK.DLL, PEEK.INF, and Readme.txt in the same folder.
Right-Click on peek.INF and choose "Install".  Follow the prompts.
This copies Peek.dll and Peek.inf to C:\Windows\System\ShellExt and creates registry entries that give you a new Right-Click menu option for all file types.

Right-Click on your unknown file and choose "Peek".  You can choose Standard, Binary, or Unicode.  Start off with the "Standard" option.  It extracts as much textual content as it can to a file C:\Windows\TEMP\Peek.txt without affecting or modifying the original file.  Peek can always be uninstalled later from your Add/Remove Programs list, but I doubt you will get rid of it.

A file packed with UPX will have the following lines added near the top in the file's header information.
If you see that, then you know it has been packed with UPX and can test if it is capable of being unpacked using UPX:

upx -t filename.exe

Even if a filename has been renamed without the proper extension, it can still be tested for integrity.
If the file is uncorrupted, and the contents required to unpack it are sound, then it will report:

testing filename.exe [OK]
Tested 1 file.

To unpack a file, use the command    upx -d filename.exe.
Here's an example of unpacking CALC.EXE (Windows Calculator) which I first packed with UPX and renamed to "TEST" ie. without the file extension:

File size                 Ratio      Format      Name
--------------------   ------      -----------   -----------
94208 <-   30720   32.61%   win32/pe   test
Unpacked 1 file.

That "win32/pe" tells you that it is a 32-bit Windows executable (.exe or .dll).

You will see this if you "list" the details about a file that has been packd with UPX:
upx -l filename.exe

File size                Ratio      Format      Name
--------------------   ------     -----------   -----------
94208 ->  30720   32.61%   win32/pe   test

Even when packed with UPX and renamed to another file name without the proper extension, this file's Right-Click "properties" still tell me that it is:

Description: Windows Calculator application file
Version: 5.00.1764.1
Original File name: CALC.EXE.

If using PEEK to examine files, you usually find some giveaway signs of the file's type by the general layout.
If you can paste SOME of the contents here as extracted by peek, then we might be able to determine the file type.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
In fact, provide us with the link from where you downloaded the file as part of a package and we can have a look.
Are you sure you didn't download a version intended for Linux or some other Operating System?
venishjoeAuthor Commented:
I tried downloading the 32bit windows version and I am able to uncompress the file.

Thanks for all your help.

Thank you Joe.  Hopefully you can figure out what the file type should have been.

One warning though.  If this file exists on your computer as a result of installing a software package, then the installer routine has probably created a log that could be used if you uninstall the software.  Sometimes the file sizes are important to the uninstallation routine, and inflating the previously UPX-packaged file will now make it larger.  This could confuse the uninstaller even if you do manage to rename the file with the correct extension.

In addition to that, the actual software may do an integrity checkup on its own files when it is run, and may detect that the file size has changed.  It may see this as tampering, and cease to work or demand that you reinstall the program.

If you have a backup program that uses file sizes in any pre-configured jobs to create and restore backups, then that could also be a problem - especially during any restore process.

Undoubtedly this file was intended to remain compressed by the software authors when they wrote the package and installer.  I'm not sure why you really needed to unpack the file to find out what file file extension it should have had.  As I mentioned earlier, UPX packing is used on files just to reduce their size, but the file names remain unchanged.

Admittedly you MAY be able to see more of the content of the file through a utility like PEEK now that you have unpacked the file, but if you then intend to rename the file with the proper extension and repack it, then you have no idea what compression ratio's and other options were used when the file was originally compressed with UPX.  The UPX program (in either the 32-bit Windows or DOS versions) can accept quite a few command line options that you should know about.

The upx.html file that comes as part of the downloaded package will explain what the rather complicated options like this mean and do:
upx --best --crp-ms=999999 --nrv2b -o filename.exe

Also read the section on Win32/PE where it discusses how Screensaver file types (*.scr) are handled uniquely.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.