Hi.
I have a strange problem around DirectoryInfo and FileInfo of C# (c-
sharp). I have a File Watcher which automattically imports files from
a network drive to a directory on the local machine. Here is the code
I used:
DirectoryInfo dir = new
DirectoryInfo(SAPImportPath);
FileInfo[] fileList = dir.GetFiles("*.txt");
foreach (FileInfo f in fileList)
{
f.CopyTo(ImportPath +@"\"+f.Name);
f.Delete();
FormImport frmImport = new FormImport(connection, ImportPath
+@"\"+f.Name);
}
All works fine, until I come to a certain problem. When the directory
I import to comes to 3,909 files, the program refuses to do anything
further, until I remove those files, then it continues further. If
anyone know about this strange behaviour, I would like to know the
solution, plese.
Thank you in advance.