[DOTNET] Monitoring "last write" for a given file
by Chad Osgood other posts by this author
Nov 15 2001 11:04PM messages near this date
Re: [DOTNET] RTM version of VS.Net
|
Re: [DOTNET] Monitoring "last write" for a given file
It's simple enough for me to use the FileSystemWatcher class to detect when
a file is modified, but my problem is a bit more complex. We have files
that are being uploaded to us via ftp on a scheduled basis. What I need to
be able to do, is detect when the upload is complete so that I can take
action on the file. I can't simply monitor the size, as I'll be notified of
a change before the entire file has been uploaded. Is there a way for me to
monitor the handle count of a given process/file through any of the base
classes? If I could monitor the handle count, I would be able to discern
when a file was first opened, then closed. Perhaps there's another way to
accomplish the same goal? I'd appreciate any opinions.
For the curious, this will be a windows service that will monitor the
incoming ftp directory for file changes, so that batched data can be updated
via a DTS/BCP in SQL Server 2k.
Thanks!
Chad
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
Thread:
Chad Osgood
Deepak Rao
|