title: Exclude directories in PowerShell
body: <p>I want to exclude all directories from my search in PowerShell. Both <code>FileInfo</code> and <code>DirectoryInfo</code> contain <code>Attributtes</code> property that seems to be exactly what I want, but I wasn't able to find out how to filter based on it. Both</p>
  
  <pre><code>ls | ? { $_.Attributes -ne 'Direcory' }
  ls | ? { $_.Attributes -notcontains 'Direcory' }
  </code></pre>
  
  <p>didn't work. How can I do this?</p>