Add Filters to the Windows Common File Dialog - gHacks Tech News

Add Filters to the Windows Common File Dialog

You might have cursed the developers of Notepad for instance if you ever tried to open a file in Notepad with a different extension than .txt. Notepad can only filter file lists for txt files or display all files. If you were looking for a php or htm file for instance you had to display all files in that folder and search for the file that you wanted to open.

Notepad is just one example, several other applications like Wordpad for instance have the exact same limitation. CFD Button is a software that was developed for the Donation Coder Getting Organized Challenge. This tool adds options to Windows to define new filters for programs that use the Windows Common File Dialog.

You can for instance create a filter for php files, one for htm / html files and one for log files. Please note that creating the filters only sorts the files in that directory, this does not change the fact that a software can only open certain file types. It would not make sense to filter exe files in notepad because Notepad can't open /display those properly.

File filter list

CFD Button adds a button in each window that uses the Windows Common File Dialog. The button is located on the upper right corner of the dialog and offers quick access (two clicks) to filter file types that you have added to the software.

It is also possible to create so called favorites which are locations on your hard drives that can be opened with two mouse clicks as well.

Users can download two version, one that has to be installed and the other that is completely portable. CFD Button does not write anything to the registry except if you opt to start it with Windows which you should do if you intend to use it regularly.

What I like is that this program does work in Notepad++ as well.

We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.

If you like our content, and would like to help, please consider making a contribution:

Comments

  1. Ed said on December 5, 2007 at 1:53 pm
    Reply

    In notepad, typing *.htm;*.html into the file name box and pressing enter works as well.

  2. abhijit said on December 5, 2007 at 8:50 pm
    Reply

    As Ed says, you can do this in the Common File Dialog of any program. Just select “All Files”, in the ‘Files of Type’ dropdown and then in the ‘File Name’ type *.cpp or *.php or *.(the extension) of the file type that you need.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

Please note that your comment may not appear immediately after you post it.