Tech

File extensions in Windows: what are they and how are they handled?

File extensions in Windows are the suffixes at the end of a file name. They are normally preceded by a point as a separation of the name and are usually two to four characters long. It is a basic section for file management, but perhaps not too well known by the user on foot. We will try to update you in this article.

File extensions as characters added to the name allow identify its type or format, as well as define the applications associated with each of them or what is the same, the type of software that a computer will use when executing a file. There are a huge number of them to cover the wide spectrum of formats that a personal computer can handle.

A simple example to understand its function would be the handling of a hypothetical file called «Windows file extensions tutorial.jpg». When we try to open that file for viewing or editing, the operating system will search for any associated applications. In this case, the .jpg extension tells us that it is an image, so it will use an application that we have installed, be it internal such as Paint or third-party applications such as Gimp or Photoshop.

As we will see later, the user you can select the use of a certain application for each type of file, as well as having information about it without opening it just by seeing its extension.

file extensions in windows

How many extensions are there in Windows?

In Windows they are uncountable and are distributed according to their type. A group of them are internal to the operating system, necessary for it to function, and others correspond to the great variety of formats that a computer can handle, such as image files, video files, documents, music, the web, or others. to name some of the important and what else will sound like:

  • EXE – One of the executable file formats used to make Windows programs run.
  • PNG: Lossless Image File Format.
  • DOC / DOCX – Microsoft Word word processor document file.
  • HTM/HTML – The hypertext markup language format for creating web pages online.
  • ISO – disk images for various formats
  • PDF: A storage format for digital documents originally developed by Adobe.
  • MP3: Compressed digital audio format.
  • ZIP: compressed file format
  • TXT: plain text ASCII text file.
  • MPEG: compressed video file
  • COM: MS-DOS application

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

How to see file extensions in Windows?

Microsoft does not make the task easy because the latest versions of Windows do not show the extensions by default and if you do not change it you will only see their name. We have already discussed it on previous occasions. In our opinion they should be visible by the user. It is not only more useful, but more secure. If the file extensions are not displayed, it can be difficult to tell if a given file (following the .jpg example) is actually an image and not a malicious executable file.

Its activation is simple. For example, in Windows 10, go to any Windows File Explorer window and pull down the “View” menu. You will see a box to activate the extensions.

You can also activate them in View> Options> Change folder and search options> View. In the advanced configuration you have quite a few management options and one of them is the one that interests us. Uncheck the “Hide file extensions for known file types” option.

How to select the application for each file?

Whenever you install an application in Windows that can open a particular type of file, 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 type of file. You can launch an app 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 app associated with each extension. It’s the app that opens when you double-left-click a file. On Windows, it’s also the app that appears at the top of the list shown in the example above.

If you always use the same 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 application”. There you will see the list of those installed on your PC. Select the one you prefer and check “Always use this application to open files…” (in the example, those with the .jpg extension that will be opened by default with Photoshop 2020 until the user changes it.

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

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 may go ‘crazy’ and the file may be temporarily unusable. As an illustration, we renamed a .jpg image file to a .txt text file and tried to run it. The system tries to open it in Notepad and returns gibberish like the following:

To solve it, it’s just a matter of rewriting the original extension. Windows will usually warn you of the issue with an error message before any changes.

At this point, it is worth making a safety recommendation important and it is to be extremely careful when opening files from untrustworthy sources. Especially those potentially dangerous ones in executable formats or those that execute code like 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.

How do you handle Linux or macOS extensions?

Linux and macOS also use file extensions, but they don’t depend on them like Windows does. Instead, they use the protocol MIME 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 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 can still program the file with the correct program due to the file information contained in its header.

Therefore, file extensions are not displayed on systems like macOS by default. However, you can also make Apple’s system display extensions and it’s probably not a bad idea to do so for the reasons explained for Windows. The way to do it is simple, from Finder> Preferences> Advanced, activate the box “Show all file name extensions”.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *