I have following code:
foreach (string file in Directory.EnumerateFiles(@"mynetwork\dirall", "*.*", SearchOption.AllDirectories))
{
list.Add(file);
}
Directory has some 2 million files. I want to build the index out of it that I
will write to file from the list object I populate.
It takes near about 45 mins to exectute. Can I divide this process to execute parallelly?
Any idea? Threading or something?
I got it working by using following code that I got from the Stackoverflow!