By default, Windows 8.1's file manager, the File Explorer application (formerly known as Windows Explorer) does not show the file extension for most file types. This is a security risk as anyone could send you a malicious file named "Runme.txt.exe" but Windows will hide the .exe portion, so an inexperienced user can inadvertently open the file thinking that it is a text file and malware will infect his or her PC.
In this article we will look how to change this behavior so file extensions are always shown, and, as a bonus, we will also look at how we can force File Explorer to always show or always hide file extensions for a specific file type.
In Windows 8.1, there are some options which allow you to show or hide file extensions in File Explorer. Let's explore them all.
The first option is in the modern Ribbon interface. It has a checkbox on the View tab to toggle File name extensions.
Tick the File Name Extensions checkbox and you will get them showing instantly:
Quite simple, right? Let's see the second method which is useful for Windows 7 and Windows XP/Vista users too.
The second option is in Folder Options inside Control Panel. You can also access Folder Options from the View tab of the File Explorer Ribbon. If you are using Windows 7 or earlier versions of Windows, press Alt, then T to show the Tools menu. Inside the Tools menu, you will see Folder Options.
The Folder options dialog will appear on the screen:
Here, switch to the View tab and untick the Hide extensions for known file types checkbox.
The result will be the same - extensions will be turned on.
You may notice that some files, like DLL files, have extensions displayed in File Explorer even if you have turned extensions off. In the screenshot below, you can see that File name extensions checkbox is unchecked, however, extensions are visible for *.dll files.
Does this mean that the extension setting is broken from dll files? No.
In Windows, it is possible to force File Explorer to hide or show file extensions for a specific file type. This can be done using Registry Editor. For example, let's make the file extension for EXE files always visible. Look at the following image:
One of the two files is an EXE file, and the second one is an icon (.ICO) file. They completely look the same in the Explorer window when file extensions are hidden.
To force File Explorer to show the file extension for EXE files, you need to do the following:
- Open the Registry editor. If you are not familiar with the Registry Editor application, here is an the awesome article for you.
- Navigate to the following key:
Tip: You can access any desired Registry key with one click.
- Look at the right side and see the Default value. It's value data is exefile.
This value called the ProgID and it points us to the required subkey of HKCR key, i.e.
Open this subkey and create an empty string value here named AlwaysShowExt:
- Now sign out from your Windows session and sign in back or just restart the Explorer shell.
You will get the following changes:
From the image above, you can see that extensions are always visible now for *.exe files even if they are turned off for other file types.
Let's try now doing the opposite and force File Explorer to always hide the extension of *.exe files even when file extensions are enabled.
- In the same registry key, HKEY_CLASSES_ROOT\exefile, delete the AlwaysShowExt value and create a new empty string value named NeverShowExt
- Again, restart the Explorer shell. The file extension for *.exe files will be always hidden even if you turn on file extensions for other file types:
Using these simple tweaks, you can control file extensions for any file type you wish to show or hide. This trick works in all modern Windows versions including XP, Vista and Windows 7.
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options: