3

Is there any way to add a "file extension" column so that I can sort folder contents by file extension? I installed Notepad++ and now ALL file types that it is associated with are just described as "Notepad++ Document" whether they are .txt, .cpp, .pl or .bat files, making it impossible to sort a folder's contents sensibly.

1
  • For a record: On Windows 11 and Windows 10, there is a "File extension" column that does exactly this. Commented Oct 15, 2023 at 22:05

6 Answers 6

1

Is there any way to add a "file extension" column to Windows Explorer?

This is not possible.

As a workaround you can remove Notepad++ from the list of File Type Associations. This will remove the "Notepad++ document" displayed in Windows Explorer and restore the ability to sort by "Type" as you would like it to work.


How do I remove a Notepad++ File Type Association?

  • Menu > "Settings" -> "Preferences":

enter image description here

  • Select "File Association" on the left side.

  • This tab has three lists:

    1. The rightmost one, "Registered exts," contains all extensions associated with Notepad++.
    2. The middle list is an incomplete list of extensions that are not associated with Notepad++.
    3. The leftmost list, "Supported exts," names various sets of file types, which you may want to consistently associate (or so the developer thought).

On either side of the Registered list are "arrow" buttons which are used to change associations.

  • To unregister an extension, select it in the "Registered exts" list, and click the left pointing arrow. Repeat for all the extensions to be unregistered, then press "Close".

Before:

enter image description here

After removing .txt:

enter image description here

  • Predefined extensions are recycled and become available again on the middle list the next time the corresponding category is selected on the left.

Source File Associations

1

More: You can't add any columns to Explorer that aren't among its already-available options.

That used to be possible with a bit of coding, but unfortunately, Microsoft removed support for "column handler extensions" as of Vista. Per MSDN, they're not back yet. (See Creating Column Handlers.)

Your alternative is to try a third-party file browser.

Personal recommendation: Explorer++ is free (donateware), fast, open source, tabbed!!!, lets you search using regular expressions!!!, reliable in my experience, and will do what you want with a couple of clicks—pretty much exactly the way you'd do it in Explorer if Explorer had that column. Explorer++ is very complete; it's intended to be usable as a viable replacement for Explorer.

Screen snapshot of Explorer++ after adding "Extension" column

I know this doesn't exactly satisfy your question (as far as we know, that's impossible), but it does give you a tool that will solve your problem. Try it.

1
  • You can also do this with XYplorer (which I am using ;)
    – DavidPostill
    Commented Sep 6, 2015 at 12:05
1

Adding a File extension column may not be possible, but it is possible to group/sort by file extension using Ivo Beltchev's Classic Explorer. A custom toolbar button can be created with the command:

groupby {E4F10A3C-49E6-405D-8288-A23BD4EEAA6C}, 100

Custom toolbar button: Group by file extensions


Result:

Files grouped by file extension

1

If you can't add a custom column, you can override what shows up in the "Type" column.

By now in 2021 Microsoft has added a column for "File Extension" in Windows 10 that you can add, but this question is for Windows 7.

The utility Types, a "File Type Manager" lets you set what shows up in the Type column for a given file type. It requires to manual effort to do it, but has the benefit of not needing a 3rd party file explorer.

enter image description here


Types

0

David Postill says you can't do exactly what you want, and I've no reason to disbelieve him.

However, in Explorer, choose Tools|Folder options, go to the View tab and uncheck "Hide extensions for known file types" in "Advanced settings". You won't get a separate column but it will display the file extension after each filename (e.g., "foo.c" instead of just "foo").

2
  • 1
    Unfortunately your answer (while factually correct) still doesn't enable sorting by "Type" (which is based on the file extension) which is what the OP wanted. The "Type" is "Notepad++ Document" for many files so they don't sort correctly when sorting on the "Type" column.
    – DavidPostill
    Commented Sep 6, 2015 at 10:54
  • @DavidPostill I missed the part about sorting. Mind blown that Windows can't do that any more. Commented Sep 6, 2015 at 11:00
0

propsys.dll contains all the column definitions as XML; by simply opening the DLL with a hex editor and searching for System.FileExtension you should find an element like the following:

<propertyDescription name="System.FileExtension" formatID="{E4F10A3C-49E6-405D-8288-A23BD4EEAA6C}" propID="100">
    <searchInfo inInvertedIndex="true" isColumn="true" columnIndexType="OnDemand" isColumnSparse="true" mnemonics="@propsys.dll,-39417">
    </searchInfo>
    <typeInfo type="String" isInnate="true">
    </typeInfo>
    <labelInfo label="@propsys.dll,-38790" invitationText="@propsys.dll,-39151">
    </labelInfo>
</propertyDescription>

Modifying the <typeInfo> element to include isViewable="true" makes the 'File Extension' option appear in the list of columns to choose from. If you fiddle with the whitespace you should be able to add this attribute without changing the size of the file or affecting the entries around it.

Other attributes of interest are label and defaultColumnWidth — after some experimentation I found that the following gives good results:

<propertyDescription name="System.FileExtension" formatID="{E4F10A3C-49E6-405D-8288-A23BD4EEAA6C}" propID="100">
    <searchInfo inInvertedIndex="true" isColumn="true" columnIndexType="OnDemand" isColumnSparse="true" mnemonics="@propsys.dll,-39417"/>
    <typeInfo type="String" isInnate="true" isViewable="true"/>
    <labelInfo label="Ext" invitationText="@propsys.dll,-39151"/>
    <displayInfo defaultColumnWidth="5"/>
</propertyDescription>

All this is documented at https://docs.microsoft.com/en-us/windows/win32/properties/propdesc-schema-propertydescription

Final result:

Ext column in Windows 7 Explorer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .