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.
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.
Advertisement
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.
In notepad, typing *.htm;*.html into the file name box and pressing enter works as well.