title: Ignore a directory in Powershell for Get-childItem
body: <p>I am trying to recursively get the files from a folder with multiple sub-folders. I noticed that Windows XP created this 5b....cb\amd64 files in the folder and it keeps throwing me the access denied error.</p>
  
  <blockquote>
    <p>Get-ChildItem: Access to path is denied.</p>
  </blockquote>
  
  <p>I do not have admin rights in these machines and what I am trying to do is skip these folders.</p>
  
  <p>Is there a way to do this? Here is what I have tried with no success. Is it a good idea to suppress these messages as it does not break the script? Any help will be appreciated.</p>
  
  <pre><code>Get-ChildItem $sourceDir -Recurse  | ? { $_.FullName -notlike '*\5b...cb\*'} 
  | Where-Object {$_.CreationTime.Date -eq ((Get-Date).Date)} | 
  foreach {
      Write-Host $_
  }
  </code></pre>