M
MSDN
Hello,
I have the following code below that does not work for me because the
directory has millions of files.
foreach (string ofile in System.IO.Directory.GetFiles(strMyDir))
{
System.IO.FileInfo oFI = new System.IO.FileInfo(ofile);
oFI.Delete();
}
How can I get the first file and delete it then go back and get the first
file and delete it and repeat....
My system crashes because System.IO.Directory.GetFiles(strMyDir)) has to
ready 100 million files first.
Any ideas
thanks
SA
I have the following code below that does not work for me because the
directory has millions of files.
foreach (string ofile in System.IO.Directory.GetFiles(strMyDir))
{
System.IO.FileInfo oFI = new System.IO.FileInfo(ofile);
oFI.Delete();
}
How can I get the first file and delete it then go back and get the first
file and delete it and repeat....
My system crashes because System.IO.Directory.GetFiles(strMyDir)) has to
ready 100 million files first.
Any ideas
thanks
SA