On 18 Oct 2004 07:17:29 -0700, Jason wrote:
>
> Is there anyway to set a NotifyFilter to respond ONLY when the file
> has been "completely" created?
Not to my knowledge. I have used two methods. The first method is to have
the file placed in the folder using a temporary name and then rename it to
the expected name. Then handle the Rename event of the FileSystemWatcher.
The second is when the Create event occurs, attempt to open the file
exclusively. If that fails, then the file is still being copied in. Keep
attempting to open the file in a loop until you are successful. Then you
can perform the file.copy.
--
Chris
dunawayc[AT]sbcglobal_lunchmeat_[DOT]net
To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
|