Using System.IO.Directory.GetFiles() like this
string[] fileFullPaths1 = Directory.GetFiles(@"C:\Windows\System32", "mycompanyname.scr");
string[] fileFullPaths2 = Directory.GetFiles(@"C:\Windows\SysWOW64", "mycompanyname.scr");
I find the following two files:
- C:\Windows\System32\mycompanyname.scr
- C:\Windows\SysWOW64\mycompanyname.scr
Windows explorer cannot see the one in C:\Windows\System32, nor can a command line dir. Furthermore, my own code that searches the MFT shows that there is only one instance of mycompanyname.scr in the MFT and its parent directory record number points to C:\Windows\SysWOW64, so I don't think that hard links are confusing the issue. I have also checked that neither of the two directories are junction points.
Could someone please explain why this is?