M
Mike Andrews
Guys,
I've got a bit of a problem...
I'm using a SystemFileWatcher to watch for new files that get built in a
directory. The problem I have is that the file being written is about 4mb in
size. It's being written from one server to another server the file watcher
is running on. What I've been trying to do is fire off a timer, in the
Change event of the SystemFileWatcher, to try to open the file to see if
it's done being written to or not; catching an exception if not and waiting
for the next tick event. However, the timer will not fire. I've tried
Timer.Start() and Timer.Enabled = True, I've tried both, but to no avail.
Does anyone know if this is a bug or not or if I'm doing this wrong?
Also, I was using the event from the SystemFileWatcher to accomplish the
same task, but occasionally, it wouldn't fire one last time when the file
was completed, so I never could accomplish the task I need to accomplish.
Does anyone have any better ideas on how to accomplish this, or know if you
can use a timer inside the Change event of the SystemFileWatcher class?
Thanks,
Mike
I've got a bit of a problem...
I'm using a SystemFileWatcher to watch for new files that get built in a
directory. The problem I have is that the file being written is about 4mb in
size. It's being written from one server to another server the file watcher
is running on. What I've been trying to do is fire off a timer, in the
Change event of the SystemFileWatcher, to try to open the file to see if
it's done being written to or not; catching an exception if not and waiting
for the next tick event. However, the timer will not fire. I've tried
Timer.Start() and Timer.Enabled = True, I've tried both, but to no avail.
Does anyone know if this is a bug or not or if I'm doing this wrong?
Also, I was using the event from the SystemFileWatcher to accomplish the
same task, but occasionally, it wouldn't fire one last time when the file
was completed, so I never could accomplish the task I need to accomplish.
Does anyone have any better ideas on how to accomplish this, or know if you
can use a timer inside the Change event of the SystemFileWatcher class?
Thanks,
Mike