<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Matt Refghi&#039;s Blog &#187; filter</title>
	<atom:link href="http://mattrefghi.com/blog/tag/filter/feed/" rel="self" type="application/rss+xml" />
	<link>http://mattrefghi.com/blog</link>
	<description>Computer Science and other written works</description>
	<lastBuildDate>Wed, 25 Jan 2012 14:43:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Applying a Custom Filter in an Open File Dialog</title>
		<link>http://mattrefghi.com/blog/2009/04/applying-a-custom-filter-in-an-open-file-dialog/</link>
		<comments>http://mattrefghi.com/blog/2009/04/applying-a-custom-filter-in-an-open-file-dialog/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 03:14:57 +0000</pubDate>
		<dc:creator>Matt Refghi</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[dialog]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[filter]]></category>

		<guid isPermaLink="false">http://www.mattrefghi.com/wordpress/?p=498</guid>
		<description><![CDATA[What I&#8217;m going to cover]]></description>
			<content:encoded><![CDATA[<p>What I&#8217;m going to cover now is a pretty minor feature of Windows. I would of skipped this article, but I encountered a few people that never heard of this trick. I&#8217;ve personally found it useful in scenarios where I was working with custom file extensions&#8230; for example, I knew that a particular file with the uncommon extension &#8220;.def&#8221; could be opened in Microsoft Access.  The file extension &#8220;.def&#8221; is not typically associated with Microsoft Access, but I knew it was a valid file.</p>
<p>To explain how the feature works, consider your typical, everyday &#8220;Open File&#8221; dialog:</p>
<div id="attachment_502" class="wp-caption aligncenter" style="width: 514px"><a href="http://mattrefghi.com/wordpress/wp-content/uploads/2009/04/fileopendialog.jpg" rel="lightbox[498]"><img class="size-full wp-image-502  " src="http://mattrefghi.com/wordpress/wp-content/uploads/2009/04/fileopendialog.jpg" alt="A an example of a File-Open dialog showing an active filter." width="504" height="400" /></a><p class="wp-caption-text">An example of a typical &quot;Open File&quot; dialog - from uTorrent</p></div>
<p style="text-align: left;">In this example, the dialog wants you to select a &#8220;.torrent&#8221; file by default. Because this is the <em>active</em> filter, you only see files that have a &#8220;.torrent&#8221; extension in the folders you view.  What if you had a file with a &#8220;.abc&#8221; extension &#8211; and you knew it was a valid torrent file,  just with a different extension? If you wanted to select it, you&#8217;d have to change the filter dropdown to &#8220;All Files&#8221;, and then find it that way. If you had a lot of files in the same folder as the &#8220;.abc&#8221; file, you&#8217;d have to look through the list to find the one you want.</p>
<p style="text-align: left;">Wouldn&#8217;t it be great if you could simply filter for &#8220;.abc&#8221; files, even though the dropdown doesn&#8217;t have it as an option? Guess what&#8230;<strong> you can</strong>.</p>
<p style="text-align: left;">Simply type:</p>
<blockquote>
<p style="text-align: left; padding-left: 30px;">*.abc</p>
</blockquote>
<p style="text-align: left;">in the &#8220;File name&#8221; textbox, and click press Enter.</p>
<p style="text-align: left;">This is the result:</p>
<p style="text-align: center;"><a href="http://mattrefghi.com/wordpress/wp-content/uploads/2009/04/fileopendialogfiltered.jpg" rel="lightbox[498]"><img class="size-full wp-image-504 aligncenter" src="http://mattrefghi.com/wordpress/wp-content/uploads/2009/04/fileopendialogfiltered.jpg" alt="A File-Open dialog with a custom filter applied." width="559" height="442" /></a></p>
<p style="text-align: left;">Notice how the &#8220;.torrent&#8221; file is no longer visible? This is because we just applied a custom filter, one that told the dialog to <em>only</em> display the files having an extension of &#8220;.abc&#8221;.  This little trick can be useful when you&#8217;re dealing with lots of a files -  it can reduce the clutter and make it easy to find something specific.</p>
<p style="text-align: left;">Here&#8217;s an interesting detail: if you take another look at the filter dropdown, as show in the screenshots, you&#8217;ll notice that the filter itself is shown in the name of the dropdown choice. Consider the &#8220;Torrents&#8221; filter from the above screenshot:</p>
<blockquote>
<p style="text-align: left; padding-left: 30px;">Torrents (<strong><span style="color: #339966;">*.torrent</span></strong>)</p>
</blockquote>
<p style="text-align: left;">The portion within the parentheses (green font) is the filter that Windows is internally applying when you select the dropdown. All we&#8217;re really doing by typing the filter directly in the &#8220;File name&#8221; textbox is bypassing the limited options in the user interface, likely using the same approach as Windows would had the option been available as a dropdown.</p>
<p><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2009%2F04%2Fapplying-a-custom-filter-in-an-open-file-dialog%2F&amp;linkname=Applying%20a%20Custom%20Filter%20in%20an%20Open%20File%20Dialog" title="Digg" rel="nofollow" target="_blank"><img src="http://mattrefghi.com/blog/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2009%2F04%2Fapplying-a-custom-filter-in-an-open-file-dialog%2F&amp;linkname=Applying%20a%20Custom%20Filter%20in%20an%20Open%20File%20Dialog" title="Reddit" rel="nofollow" target="_blank"><img src="http://mattrefghi.com/blog/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a><a class="a2a_button_stumbleupon" href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2009%2F04%2Fapplying-a-custom-filter-in-an-open-file-dialog%2F&amp;linkname=Applying%20a%20Custom%20Filter%20in%20an%20Open%20File%20Dialog" title="StumbleUpon" rel="nofollow" target="_blank"><img src="http://mattrefghi.com/blog/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a><a class="a2a_button_slashdot" href="http://www.addtoany.com/add_to/slashdot?linkurl=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2009%2F04%2Fapplying-a-custom-filter-in-an-open-file-dialog%2F&amp;linkname=Applying%20a%20Custom%20Filter%20in%20an%20Open%20File%20Dialog" title="Slashdot" rel="nofollow" target="_blank"><img src="http://mattrefghi.com/blog/wp-content/plugins/add-to-any/icons/slashdot.png" width="16" height="16" alt="Slashdot"/></a><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2009%2F04%2Fapplying-a-custom-filter-in-an-open-file-dialog%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2009%2F04%2Fapplying-a-custom-filter-in-an-open-file-dialog%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2009%2F04%2Fapplying-a-custom-filter-in-an-open-file-dialog%2F&amp;counturl=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2009%2F04%2Fapplying-a-custom-filter-in-an-open-file-dialog%2F&amp;count=horizontal&amp;text=Applying%20a%20Custom%20Filter%20in%20an%20Open%20File%20Dialog" scrolling="no" style="border:none;overflow:hidden;width:130px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2009%2F04%2Fapplying-a-custom-filter-in-an-open-file-dialog%2F&amp;counturl=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2009%2F04%2Fapplying-a-custom-filter-in-an-open-file-dialog%2F&amp;count=horizontal&amp;text=Applying%20a%20Custom%20Filter%20in%20an%20Open%20File%20Dialog" scrolling="no" style="border:none;overflow:hidden;width:130px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2009%2F04%2Fapplying-a-custom-filter-in-an-open-file-dialog%2F&amp;size=medium&amp;count=true" scrolling="no" style="border:none;overflow:hidden;width:90px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2009%2F04%2Fapplying-a-custom-filter-in-an-open-file-dialog%2F&amp;size=medium&amp;count=true" scrolling="no" style="border:none;overflow:hidden;width:90px;height:20px"></iframe><!--<![endif]--><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fmattrefghi.com%2Fblog%2F2009%2F04%2Fapplying-a-custom-filter-in-an-open-file-dialog%2F&amp;title=Applying%20a%20Custom%20Filter%20in%20an%20Open%20File%20Dialog" id="wpa2a_2"><img src="http://mattrefghi.com/blog/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://mattrefghi.com/blog/2009/04/applying-a-custom-filter-in-an-open-file-dialog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

