16 C
Texas

File extensions on Windows: what they are and how to handle them

File extensions on Windows are suffixes placed at the end of a file name. They are usually preceded by a period as a name separator. In addition, they typically have a length of two to four characters. It is a basic section for file management. However, it is perhaps not too well known to the average user. We will try to bring you up to date in this post. File extensions, as characters appended to the name, allow identifying their type or format. They also allow you to define the applications associated with each of them. That is, the type of software that a computer will use when executing a file. There are a huge number of them to cover the wide range of formats that a personal computer can handle.

A simple example to understand its function would be the handling of a hypothetical file named Tutorial file extensions.jpg. When we try to open that file to view or edit it, the operating system will look for any associated application. In this case, the .jpg extension tells us that it is an image. Consequently, it will use an application that we have installed. This app can be Windows’ own Paint or others from third parties such as Gimp or Photoshop.

As we will see later, the user can select the use of a specific application for each type of file. In the same way, you can have information about it without opening it, just by looking at its extension.

How many file extensions are there on Windows?

On Windows there are countless of them, and they are distributed according to their type. A group of them are internal to the operating system, necessary for its operation. Others correspond to the wide variety of formats that a computer can handle, such as image, video, document, music, web and other files. To name a few of the most important and most familiar to you:

  • EXE: one of the executable file formats used for Windows programs to run.
  • PNG: lossless image file format.
  • DOC / DOCX: Microsoft Word processor document file.
  • HTM / HTML: HyperText Markup Language format for creating online web pages.
  • ISO: disk images for various formats
  • PDF: storage format for digital documents, initially developed by Adobe.
  • MP3: compressed digital audio format.
  • ZIP: compressed archive format
  • TXT: plain text ASCII text file.
  • MPEG: compressed video file
  • COM: MS-DOS application
- Advertisement -

These are just a few examples of the best known ones because there are many, many more. Some are industry standard and others have been created by the developers themselves to run particular applications.

How to view file extensions on Windows?

Microsoft does not make it easy because the latest versions of Windows do not show the extensions by default. Besides, if you do not change it, you will only see its name. The best thing is that they should be visible to the user. It is not only more useful, but also safer. If file extensions are not displayed, it can be difficult to know if a given file (following the example of a .jpg) really corresponds to an image and not to a malicious executable file.

Its activation is simple. For example, in Windows 11, go to any Windows File Explorer window and pull down the View menu. Next, select the Show submenu, you will see a checkbox to enable extensions.

There is also another way to display them. From the file explorer itself, please enter the options. With this in mind, click on the 3 dots in the upper right corner. Then scroll down to the bottom and click on Options.

In the floating window, please select the View tab. Now scroll down to the bottom and uncheck the option: Hide extensions for known files.

How to select the application for each file?

Whenever you install an application on Windows that can open a particular file type, both the file extension and the software will be included in the Windows registry. It is perfectly possible to have multiple applications that can open the same file type. You can start an application and then load a compatible file into it. Or, you can right-click on a file to open its context menu and choose one of the applications that can run it. In the example, an image file in JPG format:

However, there is also a default application associated with each extension. It is the application that opens when you double left-click on a file. On Windows, it is also the application that appears at the top of the list shown in the example above.

If you always use the same one, it is useful to associate an application that is always used by default with a certain file extension. To do this, right-click on a file to open its context menu and click on Choose another app. There you will see the list of applications installed on your PC. Select the one you prefer and check Always. Thus, this will be the default app to open this type of files.

In Windows 11, you can access the same option in the System Settings>Apps> Default Apps tool and manage between the main types of image, music, video, or web files there.

Errors when changing file extensions

Windows is totally dependent on these characters to handle file execution, and if you remove them or change the extension, the operating system can go crazy and the file becomes temporarily unusable. As an illustration, we rename an image file .jpg to a text file .txt and try to run it. The system tries to open it in Notepad and returns something like the following:

To resolve it is just a matter of rewriting the original extension. Generally, Windows will warn about the issue with an error message before any changes are made. At this point, an important security recommendation is to be extremely careful when opening files from untrusted sources. Especially potentially dangerous ones in executable formats or those that execute code such as EXE, BAT, MSI or REG. You really have to be careful with all of them because malware can be included in any type of file.

GNU/Linux and macOS: How extensions are handled.

Linux and macOS also use file extensions, but do not rely on them as Windows does. Instead, they use the MIME protocol, where the creators determine the file type. 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 are not really necessary on macOS or Linux, it is quite possible that you have a valid file without an extension. However, the operating system can still open the file with the correct program because of the file information contained in its header.

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article