title: System.IO.Directory.GetFiles doesn't find any files
body: <p>I am having an issue where I have 2 GetFiles that don't seem to be able to find any files. I have commented the 2 problem lines. I have 1 file in the sourcedir and 1 in a subfolder of the sourcedir. If I take off FileIO.SearchOption.SearchAllSubDirectories, then it will find the file in the sourcedir, but not in subfolders. With FileIO.SearchOption.SearchAllSubDirectories, it finds no files at all. I am running VS2013 as Admin.</p>
  
  <pre><code>'For some reason, this finds no files--&gt; '
  
  Dim xFilesCount = System.IO.Directory.GetFiles(sourcedir, FileIO.SearchOption.SearchAllSubDirectories).Length
  Dim xFilesTransferred As Integer = 0
  
  'For some reason, this finds no files'
  
  For Each xFiles In System.IO.Directory.GetFiles(sourcedir, FileIO.SearchOption.SearchAllSubDirectories)
       System.IO.File.Move(xFiles, xNewLocation &amp; "\" &amp; System.IO.Path.GetFileName(xFiles))
       xFilesTransferred += 1                    
  </code></pre>
  
  <p>Edit:</p>
  
  <p>Thank you very much! I ended up using the following code, in case someone else runs across this same issue.</p>
  
  <pre><code>Dim xFilesCount = System.IO.Directory.GetFiles(sourcedir, "*.pf_import", System.IO.SearchOption.AllDirectories).Length
              Dim xFilesTransferred As Integer = 0
  
              For Each xFiles In System.IO.Directory.GetFiles(sourcedir, "*.pf_import", System.IO.SearchOption.AllDirectories)
  
                  System.IO.File.Move(xFiles, xNewLocation &amp; "\" &amp; System.IO.Path.GetFileName(xFiles))
                  xFilesTransferred += 1
  
                  ProgressBar1.Value = xFilesTransferred * 100 / xFilesCount
                  ProgressBar1.Update()
                  Application.DoEvents()
              Next
  </code></pre>