I wanted to write a small code to find all the files in the given path using some filter. The logic i implemented for this is shown in the code section below. When i use this and search, it does search but surprisingly not complete!!!
for example, if i search using the above logic with .chm filter, i get 91 files in the specified directories and subdirectories. but if i do a search using the windows search in the same path with the same filter i get around 95. i did see for many folders and the difference is too high some times!! any idea what happening?
string strFilter = "*.chm;";
string m_arExt = strFilter.Split(';');
foreach (string filter in m_arExt)
string strFiles = Directory.GetFiles(@"D:\\Personal", filter, SearchOption.AllDirectories);
int count = listBox1.Items.Count;
textBox1.Text = count.ToString();