How to determine a file type without an extension. Unsuccessful file renaming What file names are composed, correct

Imagine that you receive mail from your friends or colleagues, and as an attachment they sent you some 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. 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 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 open double click mice. For example, your file was called “Letter.doc”, which used to be easily opened using Word programs, and after the 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 just add it required extension, 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 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 - 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
  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 you try 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 choosing the wrong program for of this type 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 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 we have in front of us is to look at the contents of these files using simple text editors, for example, Notepad, or better yet, or using the built-in viewers of various file managers, such as Total Commander or Far, or using the free advanced text editor Notepad++. I recommend that you download and install it as it has many advantages over a regular notepad.

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 it’s better to use Notepad++, because when opening large files Notepad just freezes), and we see some crazy things:

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", that is music file mp3 format, and this is the extension that needs to be registered for 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 of 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 contents, 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 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 graphic format 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 applications Office versions 2003 and below. 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 V 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 file “resolution”, from which we erased 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 it 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, if unidentified files are large, try first using the first method of determining its type, namely, viewing the contents of the file through file manager or Notepad++ editor.

Of course you can use it 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

The computer works with information, which can be text, graphic, audio or video format. All information processed on a computer is stored in files.

The concept of a file is one of basic concepts computer literacy.

A file is a named area of ​​memory on computer storage media.

In other words, a file is a collection of data on computer storage media ( HDD, CD and DVD disc, flash drive, etc.), which has its own name (file name).

File name

What characters can be used in a file name? It is recommended to use Russian and Latin letters, numbers, spaces and punctuation marks in file names. However, the file name should not begin with a period, nor should it use square brackets or curly braces ( ) in the name. The following service characters are invalid for file names: / \ | : * ? “< >

Is there a maximum filename length? The file name length must not exceed 255 characters. In fact, 20-25 characters are usually enough.

Windows does not differentiate between lowercase and uppercase letters for file names. This means that you cannot store files whose names differ only in case in the same directory. For example, two file names "Title.doc" and "TITLE.doc" for Windows will be the same name for the same file.

File type

Do you think there can be several files with the same name PRIMER in one directory? This is possible provided that the PRIMER name has different extensions.

File name extension points to file type(sometimes they also say - format file). Thus,

  • "file type",
  • "file format",
  • "file extension",
  • “file name extension”

- this is, by and large, the same thing.

For example,

PRIMER.doc(x) – the file type is Word document(or file in Word format),

PRIMER.bmp – the file type is a picture,

PRIMER.avi – the file type is a video file,

PRIMER.wav – The file type is an audio file.

All these files have different names (due to different file name extensions) and can be stored in the same place, i.e. in one directory. If we draw an analogy with people's names, then the file name is the same as the person's name, and the file name extension is the person's last name. Accordingly, PRIMER.doc and PRIMER.bmp by this analogy are the same as Ivan Petrov and Ivan Sidorov. Files with the names PRIMER.doc and VARIANT.doc are two brothers from the same document family (with the same .doc extension), just as, for example, Ivan Petrov and Fedor Petrov are brothers from the same Petrov family.

The file type (that is, the file name extension) is the part of the file name that begins with a period followed by several characters.

Common types (extensions) consisting of three letters are .doc, .txt, .bmp, .gif, etc. Case does not matter, so .doc and .DOC are the same document extension, the same file type.

The extension is an optional attribute in the file name, that is, it may not be present. In this case, there is usually no dot at the end of the file name. The extension, although not necessary, is still desirable, since it indicates to the Windows operating system the type of file.

Simply put, the file type tells Windows which program to open the file with. For example, the .doc extension indicates that the file should be opened using the Word editor, and the .cdr extension indicates that the file should be opened graphics program Corel Draw.

There are reserved (service) names that cannot be used as file names because they are device names:

PRN – printer,

COM1-COM4 – devices connected to serial ports 1-4,

AUX – same as COM1,

LPT1-LPT4 – devices connected to parallel ports 1-4 (usually printers),

CON (consol) – for input – keyboard, for output – screen,

NUL is an “empty” device.

Here are examples of file names that are invalid:

5<>8/7.txt – symbols "<», «>" and "/" are prohibited,

What's the question? - symbol "?" prohibited

PRN.bmp – here PRN is a reserved name.

Key Points You Need to Know About File Types

Depending on the file type on Windows screen are displayed various icons (icons). The first example concerns the text editor icon:

– icon of a document processed by the Word editor and having the extension .doc.

The second example concerns an archive file. This is the file that was processed using the WinRAR archiver program (RAR for short):

– icon of compressed (archive) files processed by the RAR archiver and having the .rar extension.

Why can't I see file types in my Explorer?

Windows Explorer(Start-Programs-Accessories-Explorer) by default has a mode where file name extensions (types) are not displayed on the screen, but file icons (icons) are displayed.

Learn more about how to “force” Windows to show file types:

Selecting a file type when saving a file


When saving a file, just write its name and select the file type from the available list. The selected extension will automatically be added to the file name. For example, in the figure below, the program itself will add the .jpg extension to the file name. As a result, Windows will remember this file with the name “drawing in paint.jpg”.

To avoid misunderstandings when saving files, always pay attention to the “file type” line, if there is one. After all, the file type is for Windows prompt, with the help of which the system determines which program this file can be opened.

Close relationship between a file type and the program that opens that type

If you downloaded a file from the Internet, for example, with the extension .rar, but you do not have an archiver program installed on your computer to work with such “compressed, archived” files, then do not be surprised that the file does not open. In other words, you need to be aware that if you open files, for example, in video format, then the computer must have the appropriate program to work with this format.

An analogy can be drawn between a file (more precisely, between a file type) and a program that works with this type of file. A file is a lock, and the program that opens this file is the key to the lock. As you know, a lock cannot be opened without a key, and a key without a lock is not of particular value.

Computer literacy exercises:

1) Try creating two folders on your Desktop with the names: PRIMER and primer.

To do this, on the Desktop, right-click on an empty space, and in the window that appears, click on the “Create” option and, finally, click on the “Folder” option. Instead of the words " new folder» enter "PRIMER". Then repeat all this to create a second folder called “primer”. Did Windows give you the go-ahead to open a second folder?

2) For example, go to Word editor and try saving the document with the name PRN. Does Windows allow this name for a new file?

3) How to solve the problem: “I download files from the Internet, but they are in xsd (PM)/RAR format and cannot be opened or read on the computer. What to do?"

Receive the latest articles on computer literacy directly to your Mailbox .
Already more 3,000 subscribers

.

File – it is a named area of ​​memory on computer storage media. In other words, a file is a set of data on computer media (hard drive, CD and DVD drive, flash drive, etc.), which has its own name (file name).

The file name extension indicates the file type. (PRIMER.doc – the file type is a Word document, PRIMER.avi – the file type is a video file, PRIMER.wav – the file type is an audio file).

Names-All these files have different names (due to different file name extensions) and can be stored in the same place, i.e. in one directory. If we draw an analogy with people's names, then the file name is the same as the person's name, and the file name extension is the person's last name. Accordingly, PRIMER.doc and PRIMER.bmp by this analogy are the same as Ivan Petrov and Ivan Sidorov. The file name extension is the part of the file name that begins with a period followed by several characters. Extensions consisting of three letters are common - .doc, .txt, .bmp, .gif, etc. Case does not matter, so .doc and .DOC are the same document extension. The extension, although not necessary, is still desirable, because it tells Windows what type of file it is.

There are reserved (service) names that cannot be used as file names, since they are device names: PRN - printer, NUL - “empty” device.

In different file systems Filename restrictions vary greatly:

In FAT16 and FAT12, the file name size is limited to 8 characters (plus 1 (dot) plus 3 extension characters).

VFAT has a limit of 255 bytes.

In FAT32, HPFS file name is limited to 255 characters

In NTFS, the name is limited in some OSes to 255 Unicode characters, according to the specification 32768 characters

In ext2/ext3 the limit is 255 bytes

In addition to file system limitations, operating system interfaces further limit the character set that is allowed when working with files. For Microsoft Windows Uppercase and lowercase letters, numbers, some punctuation marks, and spaces are allowed in the file name. Prohibited characters >< | ? * / \ : ".

The following timestamps can be defined for a file:

Time of creation

Modification time

Last access time.

Attributes. Some file systems, such as NTFS, provide attributes (usually a binary yes/no value encoded in a single bit).

In many modern operating systems attributes have virtually no effect on the ability to access files; for this purpose, some operating and file systems have access rights.

File operations. Conditional two types of operations with a file can be distinguished - those associated with its opening, and those performed without opening it. Operations of the first type are usually used to read/write information or prepare for writing/reading. The second type of operation is performed on the file as an "object" of the file system, in which the file is the smallest unit of structuring . Operations not related to opening a file. Operations that do not require opening a file operate on its “external” characteristics - size, name, position in the directory tree. With such operations, it is impossible to access the contents of the file.



List of file operations:

Opening to edit a file

Deleting a file

Renaming a file

Copying a file

Transferring a file to another file system/storage medium

Creating a symlink or hardlink

Get or change file attributes.

File types. Different operating and/or file systems may implement different file types; in addition, implementation various types may vary.

"Regular file"- a file that allows read, write, move operations within the file

Catalog(English directory - alphabetical directory) or directory - a file containing records about the files included in it. Directories can contain entries about other directories, forming a tree structure.

Hard link(English hardlink, hardlink tracing paper is often used) - in general, the same area of ​​​​information can have several names. Such names are called hard links. After creating a hardlink, it is impossible to say where the “real” file is and where the hardlink is, since the names are equal. The data area itself exists as long as at least one of the names exists. Hardlinks are possible only on one physical medium.

Many computer users are familiar with the situation: They wanted to rename a file on their computer or flash drive. We deleted the old name, wrote a new one, and here is the message: After changing the file name extension, this file may become inaccessible. Are you sure you want to change the extension? Without looking we agree, click Yes.

That's all. The icon has changed. We are trying to open. Does not work. The system prompts you to select a program to open.

Why is this happening?

Brief information: The file name in the Windows operating system consists of two parts separated by a dot. The first part is the file name itself, and the second part is the extension.

File extension indicates to the system the type of information stored in the file (music, text, drawing, etc.) For example, Article.docx - here the file name is Article, and the extension is docx. After removing the extension, the system does not know how or how to open such a file.

By default, Windows displays file extensions that are disabled, so we only see the name. If you receive a message when trying to rename or when creating a new file, this means that the display of file extensions has been enabled in the settings.

How to fix?

Windows XP - 7

To return the display of file names to your usual state, take the following steps:

1. Open any folder with files

If your file names show the extension, then move on to the next step.

2. In the menu Service select an item Folder properties

Switch to the tab View

Scroll down the list of settings and check the box by left-clicking Hide extensions for registered file types and press the button OK.

(Alternatively, you can click Restore defaults. In this case, all file and folder display settings will be returned to their original default settings).

Windows 8 - 10

IN latest versions Windows operating system this can be done in the folder window on the tab View. Open any folder with your files. For example, downloads. Click on the tab View. In chapter Show or hide uncheck the box Filename extensions(marked with a red arrow in the figure).


Hiding file extensions in Windows 10

The blue line shows file extensions. They cannot be deleted. If you change the file name, the extension must be kept. It’s easier to uncheck the box, as stated above. Then renaming will be safe.

Dear reader! You have watched the article to the end.
Have you received an answer to your question? Write a few words in the comments.
If you haven't found the answer, indicate what you were looking for.

All programs and data in computer memory and on disks are stored in the form of files. A file is information stored in long-term memory as a single unit and identified by a name.

The file name consists of two parts: the name itself and the extension.

The name of the file is chosen by the person who creates it. In the operating system Windows name file can have up to 255 characters , it can use letters of the Latin and Russian alphabets and some other symbols. At the same time, the use of Russian letters and spaces in file names, although acceptable, can create serious problems (when published on the Internet and transferred to other operating systems). The file name must not include the following characters: \ / : ? " |

Expansion is usually automatic specified by the program where you work, and indicates the file type (although the user can specify non-traditional extensions). It tells the user and the computer what information is stored in the file and what program created the file. The extension almost always consists of three letters of the Latin alphabet. The extension is separated from the name by a dot.

There are a large number of file types. Here are some of them:

executable- files containing ready-to-execute programs; they can be recognized by extensions com, exe;

text documents - have extensions txt, doc, rtf;

graphic- files containing images; their extensions - bmp, jpg, etc.;

The hard drive of one computer can store a huge number of files - tens and even hundreds of thousands. To avoid confusion, all files are stored on a specific system: in folders, which, in turn, can be contained in other folders (be nested within them) and so on. Suppose there are several games recorded on the computer’s hard drive. The game is a set of files. Each game is stored in separate folder, while all folders with games can be nested in one for convenience shared folder With name Games.

The file storage system is similar to storing a large number of books in a library:

Let's look at one of the tools that allows you to see what files are stored on your computer. 

Window My computer opens by double clicking on the icon of the same name located on Desktop. Window My computer contains icons of all computer devices on which you can store files. It may also contain an icon Control Panel and icon Printers.

To find out what is stored on drive C:, double-click on its icon - the contents of the disk will be displayed in the window. This window can contain several types of icons:

alone- to present data files;

other- for presenting program files;

third- to present folders;

Besides, you can also see shortcuts that provide fast access to any folder, program or document. 

Open a folder by double-clicking on its icon.

Double-click on the file icon to open the corresponding file.

While working on a computer, the most common file operations performed are modification, copying, deleting, and moving. Here you can also draw an analogy with books in a library:

When working with files you should not:

delete a file without determining whether this should be done;
give the file a name that does not explain its contents;
save the file in a folder where it will be difficult to find later;
delete or move files located in folders application programs- this may cause programs to stop working.

Poster "Computer and Information"

Poster “How information is stored in a computer”

The most important

A file is information stored in long-term memory as a single unit and identified by a name.

The file name consists of two parts. The name of the file is chosen by the person who creates it. The extension is usually automatically set by the program that creates the file and indicates the file type.

To avoid confusion, all files are stored in a specific system: in folders, which, in turn, can be nested in other folders and so on.

Questions and tasks

1. What is a file?
2. What parts does a file name consist of?
3. What rules should you follow when writing a file name?
4. Describe the disk file storage system.
5. What operations can be performed with files?
6. What actions should be avoided when working with files?

EC TsOR resources

Animation Files and folders (N 196624)

Practical work No. 1
"We work with files and folders"

Part 1

1. Get yours workplace at computer.

2. Double-click the left mouse button to open the window My computer.

3. Make sure that the menu View enabled checkbox Large icons.

4. Double click on the icon hard drive WITH: and look at its contents.

5. Find the folder My Documents and open it by double clicking on the corresponding icon.

6. In a folder My Documents find the file Home.doc for or Home.odt for from folder Blanks. Open it by double clicking. Read and follow the instructions contained in the file ( close the window by clicking the close button).

7. Find on Desktop folder My Documents and open it.

8. Open the folder 6th grade, nested in the folder My Documents. Consider its contents.

9. Open the folder Blanks, nested in the folder 6th grade. Run the command [View - Table]. Review the information provided for each file.

10. Arrange file icons in alphabetical order. To do this, place the mouse pointer in a clean area of ​​the window Blanks and right click ( call context menu ). Run the command [Arrange icons by name].

11. Arrange the file icons in ascending order of file size ( [Arrange icons by size]).

12. Arrange icons according to types files.

13. In a folder 6th grade create your own folder in which all your work will be stored. To do this, move the mouse pointer to a clean area of ​​the 6th grade window and right-click ( call the context menu). Run the command [Create - Folder] and enter your last name as the name of the new folder. Make sure your last name is spelled correctly and press the key (Enter).

14. Go to the My Documents folder. Close the My Documents folder window.

Computer workshop can be conducted in operating rooms Windows systems, Linux and MacOS using packages Microsoft Office and OpenOffice.org. ( http://metodist.lbz.ru/authors/informatika/3/umk.php ). Detailed description works for OpenOffice.org are contained on CD with software and methodological support and posted on the publisher's methodological support website. 

Now we can

- open and close folders;
- organize the contents of a folder - files and subfolders;
- create folders.