In computing, the file extension is a string of characters appended to the end of a file name separated by a period. The extensions usually determine the type of file format to which they belong and thus be able to be recognized by the operating system or by the program that executes it (in addition to being able to be recognized by the users themselves).
On UNIX systems extensions are used as a simple convention and not necessarily to determine the file format.
In the past, DOS systems allowed extensions of three or fewer characters and this is why most current extensions have that maximum number of characters, despite the fact that Windows supports longer ones.
By default the Windows operating system does not show the extensions of the «known» files, this option must be activated manually. To recognize a file with a certain extension, a certain icon that represents it is usually used.
A very common deception technique for the transmission of computer viruses consists of simulating that a type of file with a harmless extension is being executed, but it turns out to be an executable extension such as exe, .com or .pif.
identification of a file
In Windows, a file consists of two parts separated by a period to be able to be identified by the user:
Filename.extension
Typical file extensions
compression and archiving
– ZIP
-RAR
-BMP
-PCX
See: Compressed and archive file extensions
Charts, images, and vector graphics
– GIFs
-JPG
-BMP
-PCX
-PNG
-ICO
– TIF
-SVG
-PSD
See Image Extensions.
Texts and documents
-TXT
– DOC
– DOCX
-HTML
-PHP
– PSA
See Text Extensions.
executables
– COM
– EXE
– BIP
– BAT
music
-MP3
– MID
-WAV
– Flac
-WMA
-VOC
See Audio Extensions.
Video
-mpg
-AVI
– MP4
-FLV
– 3GP
-MOV
– AMV
-WMV
– OGG
See Video Extensions.
System and configuration:
– START
– DLLs
– LOG
See System Extensions.
Disc image:
-ISO
-BIN
– CUE
The alternative on the internet: the MIME
To determine the type of file on the Internet, the MIME type is often used, in the form «Content-type: XXXXX». Where XXXXX indicates the type of format, such as «text/plain» for plain text.
For more information read: MIME.
Windows may not display file extensions
By default, Windows displays file extensions. For a while, in Windows 7, 8, and even 10, this wasn’t true, but luckily they changed the default setting. We say fortunately because we find that displaying file extensions is not only more useful, but also safer. Without the file extensions displayed, it can be hard to tell if that PDF file you’re looking at (for example) is really a PDF file and not a malicious executable file.
If file extensions aren’t showing up for you in Windows, they’re pretty easy to show back. In any File Explorer window, go to View > Options > Change Folder and Find Options. In the Folder Options window, on the View tab, clear the «Hide extensions for known file types» check box.
In newer versions of Windows go to Windows Explorer, click on the View tab in the Show or hide section (top right) check the File name extensions option.
Extensions on Linux and macOS
So we talked about how Windows uses file extensions to know what type of file it’s dealing with and what application to use when it opens the file. Windows knows that a file named readme.txt is a text file because of that TXT file extension, and it knows to open it with your default text editor. Remove that extension and Windows won’t know what to do with the file anymore.
While macOS and Linux still use file extensions, they don’t rely on them like Windows does. Instead, they use something called MIME types and creator codes to determine what a file is. This information is stored within the file header, and both macOS and Linux use that information to determine what type of file they are dealing with.
Since file extensions aren’t really necessary on macOS or Linux, it’s quite possible that you have a valid file with no extension, but the operating system could still open the file with the correct program due to information contained in the file header.
What happens when you change an extension manually?
As we just mentioned in the previous section, what happens when you change a file’s extension depends on what operating system you’re using.
In Windows, if you delete a file extension, Windows no longer knows what to do with that file. When you try to open the file, Windows will ask you which application you want to use.
If you change an extension, say you change the name of a file from «coolpic.jpg» to «coolpic.txt» – Windows will try to open the file in the application associated with the new extension, and you will get an error message or a file open. , but useless. In this example, Notepad (or whatever your default text editor is) will open the file «coolpic.txt», but it’s just a jumble of text because it’s a compressed jpg image.
Doubts? needs more information? Write and we will respond to your email: click here