Weighing in at this late date, GetFiles DOES NOT always return all files, and I haven't figured out why either. Here is one way to reproduce (at least on 64-bit Windows 7 Home, running as Administrator and using C# with Visual Studio 2010).
Install the FTDI Drivers EXECUTABLE installer from here
(http://www.ftdichip.com/Drivers/D2XX.htm)
This will install the following files in \Windows\System32:
-ftbusui.dll
-ftcserco.dll
-ftd2xx.dll
-FTLang.dll
-ftserui2.dll
The following code:
String[] files = Directory.GetFiles(Environment.SystemDirectory, "f*.*", SearchOption.TopDirectoryOnly);
returns ftd2xx.dll, but not the other four files.
Changing the searchPattern to *.*, or simply using:
GetFiles(Environment.SystemDirectory)
returns ftd2xx.dll, but not the other four files.
None of the files are hidden and all five have the same Owner and Permissions. All five files show up in Windows Explorer and in a Command Prompt window.
In fact, the following returns false:
File.Exists(@"c:\Windows\System32\ftbusui.dll")
and the four files don't show up in a OpenFileDialog dialog. Running the executable as Admin makes no difference and turning off UAC doesn't help.