Why do files need name extensions - basic types. What is a file extension

Imagine that you receive mail from your friends or colleagues, and as an attachment they sent you some kind of 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 for 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 often happens due to the fact that the file, while being attached to a 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. You can read what a file extension is, and how to display and hide them in different versions of Windows.

The second most common reason for losing a file extension is careless renaming of a file, when you have Windows set to display 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 can no longer double-open with a click of the mouse. For example, your file was called “Letter.doc”, which used to be easily opened using Word, but after renaming it became known as “Letter for work”. Please note that the file no longer has the ".doc" extension that was accidentally erased when changing the file name, and now the file will not be opened by double-clicking, but will try to ask you which program to open this file with.

It's good if you know exactly what type of file is in front of you, and you can simply add the desired extension to it, for example, doc or xls, so that it automatically opens by double-clicking on it. In a separate article you can read about. But what if you have a file in front of you whose type you don’t know? There are at least two ways to find out what type of file you have and give it the correct extension.

In this article, we will conduct an experiment - we will take several ready-made files of different formats that we discussed 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 what type it needs to be added extension to open it easily.

Several files will be involved 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 - installation file for the KeePass program (I will tell you about this wonderful program in one of the following articles)
  4. math.zip - zip archive
  5. Point Break.avi - a small video in avi format
  6. Tulips.jpg - picture with tulips
  7. Report.ppt - presentation made in MS PowerPoint 2003
  8. Materials for the meeting.pptx - presentation made in MS PowerPoint 2007
  9. Letter.doc - text file made in MS Word 2003
  10. Order.docx - text file made in MS Word 2007 editor
  11. Application 4.rar - rar archive
  12. resolution.pdf - file in pdf format
  13. Correspondence table.xlsx - data file made in the spreadsheet editor MS Excel 2007
  14. Tabular data.xls - data file made in the spreadsheet editor MS Excel 2003

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

We delete all file extensions, and after that all program icons with which you can open these files disappear. On 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 we try to open any file, Windows will prompt us to first select the program that needs to open this file:

And here you need to be careful, since the wrong choice of program for a given file type 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 for opening it will be assigned to this file.

Sometimes we can guess what type of file we have and what extension it should have by looking at the file name. But we will take the case when this is impossible.

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 yet, either using the built-in viewers of various file managers, such as Total Commander or Far, or using free advanced text editor Notepad++. I recommend that you download and install it as it has many advantages over a regular notepad.

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

This should not confuse you, since 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 begins with the letters “ID3″.

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

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

As we can see in the first line of the file contents, it is repeatedly mentioned that this is an mp4 video file (highlighted in red in the screenshot above). And in general, if you see text like “ ftypmp42“, then, as a rule, this is a video file in mp4 format.

Performing the same operation of viewing the contents with all other files, we obtain the following information:

  1. When opening the contents of the KeePass-2.28 file, you can see that the file begins with the letters MZ - this is a sign that this is an executable file.
  2. When opening 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, it is most likely 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 very first line we see a hint that this is a video file in avi format.

  1. When opening the contents of the Tulips file, we see two words that define the file format - at the beginning of the line “YaShya” and then “Exif”. These words define the graphic format of the file, in particular jpg, and in this case we are absolutely sure that this is an image 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 was made in Word, Excel or PowerPoint. The only thing you can be sure of is that these files belong to one of the MS Office applications version 2003 and lower. Therefore, to open these types of files, you can use a search of three extensions, starting with “doc”, then “xls”, then “ppt”. Typically, one of these will do.
  2. The files “Meeting Materials”, “Order”, “Correspondence Table” are a little more complicated - since they are made in MS Office 2007 applications, they are essentially 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”. However, further in the same line you can see the line .xml, it is this that will tell us that this is not just an archive, but a document from the MS Office series. Just as in the previous paragraph, you can use sequential enumeration of the three “docx” extensions ", then "xlsx", then "pptx". One of them should do.
  1. When we open the contents of the “Appendix 4” file, 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 kind of file it 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 method of determining the file type requires an Internet connection, and it is also desirable that the file size be small, since we will use an Internet service to determine the file format.

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

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

Let’s also try to check whether this service can determine the type of our “resolution” file, from which we have erased the pdf extension. We upload the file to the service, click the “Analyze” button and see that the service coped with the task perfectly:

As I already said, the disadvantage of this service may be that in order to analyze a file, it needs to download it completely, and if you have a large file, then this process may take a long time, or even not be completed at all. Therefore, if unidentified files are large, try first using the first method to determine its type, namely, viewing the file contents through the 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 will be much easier and faster to use one of the two methods proposed above.

So, dear site visitors, today we have discussed 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.

Post navigation

This is one of the common ways in which a user or computer software can determine the type of data stored in a file.

The extension is usually separated from the main part of the file name by a period. In the CP/M and MS-DOS operating systems, the length of the extension was limited to three characters; in modern operating systems this limitation is not present. Sometimes several extensions may be used, following each other, for example, ".tar.gz".

In the FAT16 file system, the file name and extension were separate entities, and the period separating them was not actually part of the full file name and served only to visually separate the file name from the extension. On the FAT32 and NTFS file systems, the dot became a common legal character in a file name, so restrictions on the number of dots in a file name and their locations on these systems were removed (with some exceptions, for example, all end dots in file names are simply discarded). Therefore, the standard search pattern *.* has no more practical meaning, it is enough to ask * , since the dot symbol now falls under the concept of any symbol.

Some operating systems or file managers may map file extensions to applications. When a user opens a file with a registered extension, the program corresponding to that extension is automatically launched. Some extensions indicate that the file itself is a program.

Pointing accuracy

Sometimes the extension indicates the format only in a general way (for example, the .doc extension has been used for many different text formats, both plain and formatted; and the "txt" extension does not give any information about what encoding the text in the file is in), due to which is why it is necessary to use other methods of determining the format.

Sometimes the extension specifies only one of the formats used in the file (for example, the ".ogg" extension was originally used for all files in the Ogg format, regardless of the codecs with which the data contained in the Ogg container was encoded). Also, the extension usually does not indicate the format version (for example, files in different versions of XHTML may use the same extensions).

Other ways to specify the format

  • Some operating systems and file systems (such as HFS) store file format information in the file system itself.
  • Magic numbers are sequences of bytes within the files themselves.
  • Shebang ( English) - in Unix-like operating systems is placed at the beginning of the executable file to indicate the interpreter that should be called when this file is launched. Consists of a comment character (#) followed by an exclamation mark (!), followed by the command to be executed with the given file as an argument.

see also

Links

  • File-extensions.org (English)
  • Dot What? (English)
  • Filext
  • Wotsit (English)

Wikimedia Foundation.

2010.

    See what “File name extension” is in other dictionaries: file name extension - The part of the file name following the dot.

    Topics information technology in general EN filename extension ...

    Technical Translator's Guide

File extensions are a privilege primarily of operating systems with a graphical interface. Their main purpose is to tell the operating system which program should be called to open a specific file.

What is a file name extension?

File name extension, (file type, file format) is a sequence of characters that helps Windows understand what kind of data is contained in a file and which program should open it. This sequence of characters is called an extension because it appears at the end of the file name, following the period. In the file name myfile.txt, the extension is txt. It tells Windows that this is a text file that can be opened by programs associated with that extension, such as WordPad or Notepad.

How can I configure the association of programs with a file name extension?

Each program installed on a computer can open one or more specific file types, each of which is recognized by its file name extension. If a certain type of file can be opened by several programs installed on the computer, then one of them is installed for use by default. To change the program that automatically opens the file type, see the post

What is the maximum filename length?

Windows typically limits file names to 260 characters. But the actual file name should be shorter, since the full path is included in this number (for example, C:\Program Files\filename.txt). Therefore, sometimes you may encounter an error when copying a file with a very long name to a folder that has a longer path than the current folder.

What characters cannot be used in a file name?

The following characters cannot be used in the file name: \ / ? : * " > < |

How can I see the file name extension?

By default, Windows hides file name extensions to make file names easier to read, but you can make the extensions visible. For more information, see post Show or hide file name extensions.

How to change the file name extension?

In general, you should not change file name extensions because doing so may make it impossible to open or edit the file. However, sometimes changing the file name extension can be useful—for example, when you want to turn a text file (.txt) into an HTML file (.htm) so that you can view it in a web browser. To change the file name extension, first make sure the extensions are displayed. Then right-click the desired file and select Rename. Remove the file name extension, type a new extension, and press ENTER. Windows will warn you that if you change the file name extension, the file may not function properly. If you are sure that the program you are using recognizes the extension you entered, click Yes to confirm the change.

Let's not talk about all sorts of extensions pointing to executable files, since the command interpreter of the operating system is also a kind of program that works with files that have a mask, for example, .COM; .EXE; .BAT; .CMD; .VBS.

Executable file extensions.

Most common file extensions in Windows

Extensions most often found on a computer are usually three-digit sequences of letters and numbers that help the OS immediately launch the desired program to display,

Eg,

Lossless audio files

(lossless compressed audio files) can have a flac, ape or wav extension.


Among the most popular formats for storing images the following are used:

1.JPEG- the most popular format for storing raster images (drawings, photographs, etc.). This format involves a high degree of compression of the contained information, which ensures a relatively small size of JPEG files. In this case, compressing photos without losing quality, unfortunately, is not impossible. However, to post photos on the Internet or send them by e-mail, it is advisable to change the photo format to JPEG. This is an economical and convenient format for storing raster information. Supports 16.7 million colors.

2.BMP- standard graphic file format for Windows. As a rule, the BMP format is used for drawings made in the Paint editor, or, for example, standard “wallpapers” for the desktop. Photos in BMP format are stored uncompressed and can take up a lot of disk space. In this regard, it is often necessary to change the photo format to a more ergonomic one (JPEG, TIF, GIF).

3.TIF- raster graphic format that allows you to compress images without loss of quality. Supports 16.7 million colors and is considered a standard format for exchanging data between computers. Popular among professionals, such as digital camera users.

4.GIF- literally translated as “graphics data interchange format”. Files stored in the GIF format are small in size and can consist of several “frames”, which allows you to create simple animations. The main disadvantage of GIF is the limited color range of this format. Therefore, to store multicolor images, it is more advisable to change the photo format to JPEG or TIF.

Vector images

The extension depends on the program in which they are made - for example,

AI (Adobe Illustrator), CDR (Corel Draw), CGM (Computer Graphics Metafile), EPS (Encapsulated Postscript format),

PS (PostScript), SVG (Scalable Vector Graphics), WMF (Windows Metafile), EMF (Extended Metafile)

Animation

APNG (Animated PNG), Autodesk Animation (.fli/.flc), Animated GIF, Adobe Flash (.swf), etc.

Text documents

text file (.txt), AmigaGuide (.guide), OpenOffice.org/StarOffice Writer (.sxw) (open text format),

TeX (.tex), Texinfo (.info), WordPerfect (.wpd), Microsoft Word (.doc, .docx, .docm) (protected Microsoft format, changes frequently, quasi-standard)

Internet (Web pages)

  • Static
    • HTML - (.html, .htm) - HyperText Markup Language
    • XML - (.xml) - eXtensible Markup Language
    • XHTML - (.xhtml, .xht) - eXtensible HyperText Markup Language
    • MHTML - (.mht, .mhtml) - archived HTML (web archive), stores all web page data (text, images, etc.) in one large file, packed using the MIME standard (MIME HTML)
  • Dynamically generated
    • ASP - (.asp) - active server pages from Microsoft (Active Server Page)
    • ASPX - (.aspx) - active server pages based on .NET from Microsoft (Active Server Page .NET)
    • ADP - AOLserver Dynamic Page
    • BML - (.bml) - Better Markup Language (templating)
    • CFM - (.cfm) - ColdFusion interpreted scripting programming language
    • iHTML - (.ihtml) - Inline HTML
    • JSP - (.jsp) - JavaServer Pages
    • Lasso - (.las, .lasso, .lassoapp)
    • PL - (.pl) - Perl programming language
    • PHP - (.php, .phtml) - abbreviation for PHP: Hypertext Preprocessor, was originally an abbreviation for Personal Home Page
    • SSI - (.shtml, .stm, .shtm) - HTML with Server Side Includes

Table of the most common extensions:

Extension File type Example
exe programs ACDSee9.exe
com Command.com
doc documents (Microsoft Word) Letter.doc
xls tables (Microsoft Excel) Catalog.xls
txt text documents text.txt
ppt presentations (Microsoft PowerPoint) Presentation.ppt
htm Internet pages Book.htm
html Book.html
hlp reference Windows.hlp
bmp drawing, photography Figure.bmp
jpg Photo.jpg
tif Nature.tif
gif Figure.gif
mp3 Music Song.mp3
mpeg video Film.mpeg
avi Clip.avi
zip ZIP archive Abstract.zip
rar WinRAR archive Abstract.rar

The extension can be long and more than 3 characters in modern Windows, but in Linux its presence is not at all necessary.

In general, file extensions in Windows are often depend on the specific application, and opening files with such an extension with a third-party application may be difficult or even impossible. For example, files created in the Adobe Photoshop graphic editor have the psd extension (however, this program allows you to save the finished file in almost any graphic format). Text files created in Microsoft Word can be recognized by the extension doc (docx for new versions of the program), and the Open Office text editor works with the odt format. Also text files may have txt or rtf resolution.


How to find out,
What types of files does your operating system work with?

Go to Conductor, in the drop-down menu Service select item Folder properties

and in the dialog box that opens, go to the tab File types.

On this tab there will be a table in two columns - the file extension in Windows and the corresponding one.

!!! Important If your computer is configured to show file extensions, then when you change the file name, leave the extension as is. That is, change the file name to the period. If you change the extension, the file may no longer open. Remember this!
strana-sovetov.com

A file format, also called a file type, is file information for a computer. Thanks to this information, the computer knows approximately what is inside the file and “understands” which program to open it in.

So that the computer understands what type of file it is and what program to open it in, the extension is indicated after the name.

An extension is a few letters or numbers after the dot in the name.

The picture shows a file with the mp3 extension. The computer “knows” about it that it is a music file, and it must be opened in a player program. The picture of the file matches the picture of the program that opens it. An experienced computer user already understands from this icon alone which program this file will open in and what type it belongs to.

There are, for example, text files. This means that the content of such files is text, and they are opened in a program for working with text. There are music and video files, that is, their contents are music and video, and they open in players. Also often found are graphic files - photographs and pictures. There are many more types. Each of them has its own icon, or rather, the icon of the program installed on the computer in which it opens.

Let me remind you that the computer determines the file type by its extension. So, many computers are configured in such a way that the file extension is not shown. It's very convenient!

To make this happen for you, open any folder and click on the “Service” inscription (at the top of the window). From the list, select "Folder Options..." or "Folder Options...".

If there is no “Service” item at the top of the window, then click on the “Start” button and open “Control Panel”. Among the icons, find and open “Folder Options” (Appearance and Personalization - Folder Options).

A window will open. Click on the "View" tab (top).

Check the box "Hide extensions for known file types" and click the "OK" button at the bottom of the window.

By the way, in the same way you can configure your computer so that, on the contrary, it does not hide, but shows file extensions.

Table of the most common extensions:

Extension Example
exe programs ACDSee9.exe
com Command.com
doc documents (Microsoft Word) Letter.doc
xls tables (Microsoft Excel) Catalog.xls
txt text documents text.txt
ppt presentations (Microsoft PowerPoint) Presentation.ppt
htm Internet pages Book.htm
html Book.html
hlp reference Windows.hlp
bmp drawing, photography Figure.bmp
jpg Photo.jpg
tif Nature.tif
gif Figure.gif
mp3 Music Song.mp3
mpeg video Film.mpeg
avi Clip.avi
zip ZIP archive Abstract.zip
rar WinRAR archive Abstract.rar

Important! If your computer is set up so that extensions are shown, then when you change the file name, leave the extension as is. That is, change the file name to the period. If you change the extension, the file may no longer open. Remember this!

Each file on a computer stores data of a certain type. For example, this could be text information, program codes, image, sound or something else. Intuitively, you already understand what a file extension is. Therefore, today we will fill in the gaps in knowledge and try to delve deeper into the topic.

Definition

The extension is the second part of the file name, located after the period. As a rule, it consists of 2-4 characters. This designation simplifies the operation of the operating system by telling it exactly what information is contained in the document and what program should be used to open the file.

When installing any new program, data is entered into the Windows registry about what formats it can work with. It is thanks to this that pictures are opened in special galleries, and music is opened using a multimedia player. If you wish, you can change the program that will be used to open certain types of files.

Popular extensions

It's useful to know not only what a file extension is, but also what types of data are stored in different documents. Here is a list of the most common ones on Windows:

  • Text: txt, .doc (.docx), .rtf.
  • Web pages: .htm and .html.
  • Archives: .zip, .rar.
  • Images: .png, .bmp, .gif, .tiff.
  • Audio: .mp3, .wav, .wma, .cda.
  • Video: .avi, .wmv, .mpg (.mpeg), .MPEG-4, .wmv, .flv, .vob, .mdv, .swf.
  • Presentations: .ppt (.pptx).
  • Tables: .xls (.xslx).
  • Fonts: .ttf, .otf.
  • E-books: .pdf, .epub, .fb2, .djvu.
  • Databases: .mdb, .accdb.
  • Executable (launch or install programs): .exe, .bat.

Tip: when working with documents of unknown formats, the Russian-language service Open-File.ru is very helpful. Just enter the name in the directory search and you will see basic information: what data the document contains (image, text, etc.), what is the appropriate file extension program in which to open it.

Setting the display of extensions

By default, the operating system automatically displays the document format next to its name. However, at any time you can prevent file extensions from being displayed in Windows or, conversely, enable them. What do I need to do?

  1. Go to "Control Panel".
  2. Find the item called "Folder Options", and in Windows 8 and 10 - "Explorer Options".
  3. In the window that appears, select the "View" tab.
  4. In the "Advanced options" list, find the "Hide extensions for known file types" item and check the box next to it.
  5. Click the "Apply" button and close the window.

Please note: If file extensions are disabled in Windows 7 or another version of the OS, you need to be careful when renaming any documents. If you accidentally delete or change this annotation, the file will be impossible to open.

How to change the extension

Now that you have the file extension, let's talk about how you can convert it. This is necessary if, for example, you want to open a file intended for one program in another application.

Strictly speaking, there are two ways to do this:

  1. To rename a document, simply enter the one you need instead of the “native” extension (for example, .html instead of .txt).
  2. Use special converter programs. Some are installed on a PC, others are available online. They are used if you need to completely change the encoding of a document.

If you want information to be displayed as correctly as possible in another program, it is better to use full-fledged converters.

One of the popular services of this type is Convertio. This online converter supports most common file extensions and also has a number of additional tools, such as compressing and merging PDF documents, a URL converter for extracting music and videos from websites, and scanned text recognition.

How to change the opening program

And finally, consider a situation where you downloaded a new application and want to use it to work with certain documents. For example, change the default photo viewer in Windows to Microsoft Office Picture Manager. How to do it?

  1. Select the desired file and open the context menu (right mouse button).
  2. Find "Open with" > "Select another app".
  3. Select the desired program from the list that appears and check the box next to “Always use this application...”.
  4. Click OK.

This means that the system will now open this file extension using the program that you have chosen. In Windows 8 and 10, if you don't find a suitable app on your PC, you also have the option to find it in the Store.