I'm using the FileSystemWatcher class to watch for newly createdfiles in a designated network location. My problem is I get aSystem.NullReferenceException when I try to process files thatare greater then 5MB in size. It appears that my application istrying to process the file before the whole file is copied intothe network folder. Is there a way that I can "halt" myprocessing
until the file has been completely copied to the folder. I triedto use the following code but
it doesn't seem to work properly:
Do While Not bAllBytesCopied
If fileInfo.Length = FileLen(e.FullPath) Then
bAllBytesCopied = True
End If
Loop
The files I'm processing can be from 5MB to 20MB in size. Pleasehelp...
Thanks
--------------------------------
From: Shawn Wilson
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>XoznoeEe1kahIHe9tfyYjA==</Id>