title: System.IO.Directory.GetFiles() doesn't list all files
body: <p>I am using the <code>System.IO.Directory.GetFiles()</code> function to list all executable files from <code>C:\Windows\System32</code> with the following code:  </p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.IO;
  namespace MyProgram
  {
      class Program
      {
          static void Main(string[] args)
          {
              string[] files;
              files = System.IO.Directory.GetFiles(@"C:\Windows\System32", "*.exe");
          }
      }
  }
  </code></pre>
  
  <p>It lists <strong>300</strong> executables:<br>
  <a href="https://i.stack.imgur.com/F5AFJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/F5AFJ.png" alt="enter image description here"></a></p>
  
  <p>But when I list all the files with PowerShell it has <strong>446</strong> executables:<br>
  <a href="https://i.stack.imgur.com/RlhoD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RlhoD.png" alt="enter image description here"></a>  </p>
  
  <p>For example: <code>C:\Windows\System32\WinSAT.exe</code>.<br>
  It doesn't list this file.<br>
  Any idea why it doesn't show me the full list of executable files ?  it misses some files.  </p>