Computers Windows Internet

How to determine the file extension. How the file extension can be used to determine its type (what it is for) and what program can open it. Default program assignment

Imagine that you receive mail from your friends or colleagues, and in the attachment they sent you a document in the form of a file attached to the letter, which contains the information you need. You save this file to your computer, but you see that instead of the usual icons of some program (Word, Excel, PDF, etc.) there is no icon, and Windows thinks that this is some kind of file with an unknown format. This is often due to the fact that the file in the process of attaching to the letter by the sender (or when the file is saved to the computer by the recipient) loses its extension, and the Windows operating system ceases to understand what type of file is in front of it, and, accordingly, does not know which program you need to open such a file. What is a file extension, and how to show and hide them in different Windows versions, you can read in.

The second most common reason for the loss of a file extension is inaccurate renaming of a file, when your Windows is set to display the extensions of all known file types, and when you try to rename a file, you accidentally erase the file extension and end up with a document of unknown origin that you cannot open with a double with a click of the mouse. For example, your file was called "Letter.doc", which used to be easily opened with Word programs, and after renaming it became known as "Letter for work". Please note that the file now does not have the ".doc" extension, which was accidentally erased when the file name was changed, and now this file will not open with a double click of the mouse, but will try to ask you which program to open this file.

It's good if you know exactly what type of file is in front of you, and you can simply add to it desired extension like doc or xls so that it opens automatically with double click mouse over it. In a separate article, you can read about. But what if you have a file in front of you, the type of which you do not know? There are at least two ways to find out what type of file is in front of you and give it the correct extension.

In this article, we will conduct an experiment with you - we will take several ready-made files of different formats that we considered in the above article, erase their extensions as if they were lost or accidentally deleted, and try to find out what type each file has and which one it needs to add. extension to easily open it.

Several files will participate in our experiment:

  1. Bonnie Tyler - Turn around.mp3 - song in mp3 format
  2. bonus.mp4 - small video in mp4 format
  3. KeePass-2.28.exe - setup file KeePass programs (I will tell you about this wonderful program in one of the following articles)
  4. math.zip - zip archive
  5. Point Break.avi - small video in avi format
  6. Tulips.jpg - picture with tulips
  7. Report.ppt - presentation made in MS PowerPoint 2003
  8. Meeting materials.pptx - presentation made in MS PowerPoint 2007
  9. Letter.doc - text file made in MS Word 2003
  10. Order.docx - a text file made in MS Word 2007
  11. 4.rar app - rar archive
  12. resolution.pdf - pdf file
  13. Correspondence table.xlsx - a file with data, made in a spreadsheet editor MS Excel 2007
  14. Tabular data.xls - a file with data, made in a spreadsheet editor MS Excel 2003

In the picture below, all files have their own extensions (highlighted with frames with red edges):

We delete all file extensions, and after that all program icons with which you can open these files disappear. In Windows XP it looks like this:

In Windows 7 it looks a little different, but the meaning is the same - the operating system does not know which program to open these files.

Now when trying to open any windows file will prompt us to first select the program that needs to open this file:

And here you need to be careful, because the wrong choice of the program for this type of file will lead to the fact that the file will not open, and the program will generate an error, and the wrong association of the program of its opening will be assigned to this file.

Sometimes you can guess what type of file is in front of us and what extension it should have by the name of the file. But we will take the case when it is impossible to do this.

So, we have a bunch of files with unknown formats and extensions, and we need to understand what these files are.

The first way to find out what type of file is in front of us is to look at the contents of these files using simple text editors, for example, Notepad, or better - either using the built-in viewers of various file managers, such as Total commander or Far, or with the free advanced text editor Notepad ++. I recommend that you download and install it as it has many advantages over a regular notebook.

We take the first file "Bonnie Tyler - Turn around", in the list of programs to open, select Notepad ++ (if you have not installed it, use a regular Notepad, but still Notepad ++ is better, because when opening large files, Notepad simply freezes), and we see some krakozyabry:

This should not be embarrassing, because to determine the file type, it is enough to look at the first line of the file contents. Here you can see that the file starts with the letters "ID3".

So, remember that if inside a file, its contents begin with " ID3“, Then this is a music file in mp3 format, and it is this extension that needs to be assigned to it. After specifying the extension, the file will be recognized by the system as music, and you can listen to it.

Open the second file "bonus" with the same Notepad ++ program and look at its contents:

As you can see in the first line of the file's content, it repeatedly mentions that this is an mp4 video file (highlighted in red in the screenshot above). In general, if you see text like “ ftypmp42“, Then, as a rule, it is a video file in mp4 format.

Doing the same operation to view the content with all other files, we get the following information:

  1. When you open the contents of the KeePass-2.28 file, you can see that the file begins with the letters MZ - this is a sign that we have an exe file in front of us.
  2. When you open the contents of the math.zip file, you can see that the file begins with the letters PK - this tells us that this file is an archive. Considering that Rar archives have a different entry in the file content, most likely this is a Zip archive, but be careful and pay attention to point 6 below.
  3. When opening the contents of the Point Break file, in the first line we see a hint that we have a video file in avi format.

  1. When opening the contents of the Tulips file, we see two words defining the file format - at the beginning of the line "ЯШя" and then - "Exif". These words define the graphic format of the file, in particular jpg, and in this case we are sure that we are dealing with a picture file.

  1. Regarding the MS Office 2003 files "Report", "Letter" and "Tabular data" - all of them in the internal content begin with "RP", so it is quite difficult to immediately determine which of them is made in Word, Excel or PowerPoint. The only thing you can be sure of is that these files belong to one of the MS applications Office versions 2003 and below. Therefore, to open these types of files, you can use an iteration of three extensions, starting with "doc", then "xls", then "ppt". Usually one of them will work.
  2. The files "Materials for the meeting", "Order", "Compliance table" are a little more complicated - since they are made in MS Office 2007 applications, in fact they are archives, and therefore at the beginning of their contents you will see the same letters as in the Zip archive, these are the letters "PK". Nevertheless, further in the same line, you can see the .xml line, it is she who will tell us that we have not just an archive, but a document from the MS Office series. The same as in previous paragraph, you can use sequential search of three extensions "docx", then "xlsx", then "pptx". One of them should work.
  1. When opening the contents of the file "Appendix 4", we see that it begins with the word "Rar" - this is the simplest indication that we have an archive in rar format.
  2. When you open the contents of the "resolution" file, you can see from the very beginning what the file is, since it starts with the line "% PDF-1.3". The numbers may vary, but nevertheless, the abbreviation pdf is usually present, and indicates the file format.

The second way to determine the file type requires an Internet connection, and it is also desirable that the file size be small, since we will be using an Internet service to determine the file format.

We click on the button "select a file", indicate our file for analysis (I will try to analyze one of the complex files "Materials for the meeting" to see if this analyzer can cope and understand that this file was created in MS PowerPoint 2007 (at it had the pptx extension, and we removed it during our experiment) After selecting the file, press the "Analize" button and get the following result:

As you can see, the service determined with a 97% probability that it is PowerPoint file with pptx extension. And since this file is also a container archive containing other files inside it, the analyzer also indicated a 3% probability that it could be a zip archive.

Let's also try to check if this service can determine the type of our file "resolution", from which we have erased the pdf extension. Upload the file to the service, click the "Analize" button and see that the service has done an excellent job with the task:

As I already said, the disadvantage of this service may be that in order to analyze the file, it needs to download it completely, and if you have a file big size, then this process may drag on for a long time, or even not reach the end at all. Therefore, with large sizes of unrecognized files, try first to use the first method of determining its type, namely, viewing the contents of the file through file manager or Notepad ++ editor.

You can of course use special programs to determine the file type, for example, File Type Verificator, but in my opinion, it would be much easier and faster to use one of the two methods suggested above.

So, dear visitors of the site, today we have sorted out how you can determine the format (type) of a file if its extension has been lost. If you have any questions, please ask them in the comments to this article.

Record navigation

Have you ever received on email or through other communication channels files without an extension? Such files look like a white icon, which indicates that the system does not know which program to open it.

In response to an attempt to open a mysterious document, Windows will offer you to choose a program yourself from the list.

This "behavior" is due to the fact that the operating system, analyzing file extensions, compares them with the desired program and assigns them the appropriate icons so that not only the machine, but also the user understands what type of information he is dealing with. In our example, the system thinks that the file we are trying to open has the extension .9, which is not in its directory, and therefore issues such a message.
How is it that the resulting document or other kind of file does not have an extension? Most likely, the fact is that your interlocutor, while editing the name of the document, simply overwritten that very extension.

How to open a file if there is no extension, but the contents of the file are known

It's good if we know the sender and know what type of document was sent to us. For example, we know for sure that this file is a table. In this case, we simply select a spreadsheet editor from the list suggested by the system and safely open our file.

To do this, hover the cursor over the file, press right key mouse and in the context menu select the item "Open with"

Then, click "Use the application from this PC"

Scroll through the list of programs to the end and select the item "Find an application on this computer"

You will be prompted to search the desired program in folder with installed programs Program Files. If the package office programs installed on your computer, then you can find the corresponding folder. If you are using free software, then instead of Microsoft Office maybe there will be folders like Libre Office or Open Office

Another option is to add the extension manually, e.g. xls, if we are talking about an Excel table.

Hover the cursor over the file, call context menu right-click and select “Rename”.

Then carefully, after the point, enter the correct extension and press Enter to save the changes. We agree with the warning, click "Yes".

But what if there is no way to specify the file type?
Needless to say, if the sender is unknown, then you should not try to open attachments under any circumstances, so as not to expose your computer to a virus infection. But if the file is obtained from a reliable source and does not cause any doubts in you, then you can find out its type only by analyzing its contents.

How to determine the type (format) of a file by its content

Any file, be it Text Document, an image, or something else, is nothing more than a code structured in a certain way, understandable to a program intended to read and / or edit it. As mentioned above, the operating system chooses a program to open a file based on its extension. It is written after the name of the file, separated by a dot. By analyzing the file image1.jpeg, where.jpeg is the extension, the system understands that this is an image, and for reading of this file you need to use an image viewer. By changing the file extension from .jpeg to, for example, .txt, we certainly will not turn the image into a text file, the system will simply try to open it with a text editor, as a result of which we will see only a set of characters. Obviously, the file format (type) is determined not by the extension at all, but by its content.
To see in the contents of a file signs indicating that it belongs to a certain type, we will use a hexadecimal editor, for example, Hex Editor or an online service.
Whichever jpeg image we open, we can observe the similarity in the first three pairs of numbers, which indicate the file type.

It remains to find what format the encoding corresponds to. But you can not complicate your life and use a ready-made application that will do all the work. In our example, this will be File program Type Verificator (FTV). It is freely distributed and has a clear Russian-language interface.
Finding out the file format with this program is as easy as shelling pears. Click the add file button,

select the desired file through the explorer window,

and we see the file format corresponding to its content.

The program provides the ability to rename a file by changing its extension. To use this function, click "File" -> "Start renaming ..."

And in the window that appears then, click apply, if you agree with the option proposed by the program.

After such manipulations, the problem file will be opened by the desired program.

Surely everyone came across a file without an extension? Do you have questions how to open it? One way is so easy to guess and try to change the file extension to different file types and try to open the file. This sometimes works, or it may not be lucky and you will not be able to guess. And the scientific poke method can take a fair amount of time, if you are stubborn, of course, and you need to open this file.

In this article, I will show you a quick and more accurate way to determine the file type that you can use. In order to do this, I created some test files, PDF, JPEG, MP3, EXE and DLL, just erased the extension from them. Obviously, your file might be different types, but the procedure is the same for any file type. I chose test files quite by accident
For this procedure, you need to know HEX- file code. Well, what are you already scared and thinking how clever it all is. No, for this we need text editor such as standard Notebook, or you can download (I even advise you to do this, it is much more functional and works faster) Notepad ++ .

Opening files without extension

And now we just open files without an extension in a test editor, I use Notepad ++, but the technique is the same for everyone.

First in line PDF test and we see in the very first lines information about the extension in an explicit form.

And we see in Jpeg at the beginning of the line, which is not clear JFIF, v DLL and EXEMZ, a MP3ID3... Next, the Internet will help us, we drive a phrase into the search engine, for example ID3 format, or JFIF extension. And we will see that ID3- this is from the English. Identify an MP3, some kind of metadata format, but it doesn't matter, it's probably an mp3 file. On request JFIF got JPEG File Interchange Format, some specification, MZ- format of executable files EXE and DLL... That is, the first lines contain all the information we need, and we can easily open any file without the extension

Overall, I believe it will be much faster to figure out this way than accidentally trying different file extensions without any idea. If you still can't figure out which file you have, please leave comments and I'll try to help. Enjoy!

Option 1

1. The collection of all programs designed to work on a PC is called:

A) applications

B) software

C) operating system

2. PC performance depends on:

A) monitor screen size

B) mains voltage

B) clock frequency

3. Two identical servers in 3 seconds can process 3 million requests from users. How many million requests can 4 such servers handle in 4 seconds?

4. The throughput of a certain communication channel is equal to 228,000 bit / s. How long will it take to transfer a 600KB file over this channel?

5.How many CDs with a volume of 700 M bytes are required to accommodate the information, completely

occupying HDD with a capacity of 50GB:

A) 74 B) 79 C) 73

6.The file type can be determined by knowing it:

A) size

B) expansion

C) creation date

7. Determine which of the specified filenames matches the mask:? Kk * .h?

A) okkii.hr B) mmokk.hrr C) ghkk.uijh

8. Input devices are: A) flash - memory B) keyboard, scanner, mouse

C) keyboard, scanner, monitor

Option 2

1. The totality of all means and rules of user interaction with a PC is called:

A) applications

B) user interface

C) objects of management

2. Which of the functions are displayed by the window state control buttons:

A) collapse, expand, restore, close

B) cut, copy, paste

C) close, close, restore, delete

3. Two identical servers in 5 seconds can process 5 million requests from users. How many million requests can 9 such servers handle in 9 seconds?

4. The throughput of a certain communication channel is 356,000 bit / s. How long will it take to transfer a 700KB file over this channel?

5.How many CDs with a volume of 300 M bytes will be required to accommodate the information, completely

occupying a hard disk with a capacity of 40 GB:

A) 136 B) 137 C) 138

6.Add by analogy: a person - Notebook, a computer:

A) processor

B) monitor

C) long-term memory

7. Determine which of the specified file names satisfies the mask:? Aa *. v?

A) okay.вr B) mmаkk.va C) gааk1.ввв

8. The computer program controls the work: A) on CD B) on DVD C) in RAM

The extension is designed to identify the ownership of objects. Each program creates files with its own set of formats. Therefore, all objects are supplied with their own attributes indicating their type - system, text, archive, audio-video, executive, etc. Using the format, you can also determine which program created the document. Windows, depending on the settings, does not always display this information. To determine the attributes of a membership and make it appear in the name, you need to follow the algorithm below. At the same time, it will be possible to find out why the user needs all this at all.

Who needs it

If the operating system detects an unknown type of document, it automatically searches for a program that can work with it. A notification window appears on the monitor screen, in which Windows displays available information about the object, and offers several applications from the existing ones, as the most suitable for working with it. The user has the following options:


It contains information about the name, as well as a standard message notifying that the operating system does not know which programs support this format. The user has 2 options for further actions:

  • Try to open the file using the programs offered by the system.
  • Download an application for working with objects of this type from the Internet;

As a rule, it is not always possible to open an unknown document using the available utilities. And it's not a fact that the program will work correctly with it. But if the extension is known, it is possible through a request in search engines the Internet is easy to find required application that meets your requirements. Some programs require quite specific knowledge and skills to install. Or, during installation, there may be a conflict with the already installed software. In this case, you need to contact technical support for help.

Format display setting

For newbie users, activating this option is not only unnecessary, but can lead to serious problems. By accidentally changing or deleting the extension of some system objects, you can damage operating system... Violations in its work can lead to irreversible loss of data or to the failure of the entire operating system. Therefore, this function is inactive by default. Well, for experienced user it will not be difficult to turn it on.

If a situation has arisen in which you need to know the attributes of any documents, then to display this information you need to do the following:

Open the "My Computer" section.


Select "Organize" to open the "Folder Options" tab.


Select the "View" section.

View menu

In the window that opens, uncheck the "hide file extensions" line. After that, click “Apply”, then “OK”. Uncheck the box marked in the screenshot, and then click the Apply and Ok buttons.

Customization

From now on, all objects should be displayed with the extension.

Determining file type without extension

If documents are downloaded from the Internet or from other media, then they can be displayed by the system without specifying attributes, even if the function of displaying it is enabled. Like the screenshot above. To find out the format of such files, there are special services on the Internet.

One of these resources looks like this:


To obtain the required information, you need to do the following:

Download the page of the corresponding resource. Click on the "Select" button.


In the selection window that opens, find the file you are looking for and add it to the list for analysis.


After processing the data, all available information about the document will be displayed on the screen. It will appear below the window for selecting objects for analysis.

By following the above algorithms, you will be able to Windows system receive information about the format of unknown documents, customize its display and, using special online services, determine the format without explicitly specified attributes.

Video: Finding File Extension