title: Determine if files with a certain file extension are not in the folder using PowerShell
body: <p>I have a folder that does not contain any files with the extension "rar". I run the following from the PowerShell commandline using gci (alias of <a href="http://technet.microsoft.com/en-us/library/hh849800.aspx" rel="nofollow">Get-ChildItem</a>):</p>
  
  <pre><code>PS&gt; gci *.rar
  </code></pre>
  
  <p>As expected, nothing is reported back since no such files exist. But when I do an <code>"echo $?"</code>, it returns true.</p>
  
  <p>How can I test the non-existence of files for a given file extension? I am using PowerShell v2 on Windows&nbsp;7.</p>