By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,639 Members | 1,988 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,639 IT Pros & Developers. It's quick & easy.

DirectoryInfo and FileInfo

P: n/a

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
FileInfo[] fileList = dir.GetFiles("*.txt");

foreach (FileInfo f in fileList)
f.CopyTo(ImportPath +@"\"+f.Name);
FormImport frmImport = new FormImport(connection, ImportPath

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.

Apr 23 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.