Re: [DOTNET] Monitoring "last write" for a given file
by Deepak Rao other posts by this author
Nov 15 2001 9:57PM messages near this date
[DOTNET] Monitoring "last write" for a given file
|
Re: [DOTNET] Thread.CurrentPrincipal lost after making a call to
a remote
object?
I am not a WMI person, but maybe you can get the information you need by
making WMI Queries using the classes in the System.Management namespace.
Deepak
-----Original Message-----
From: dotnet discussion [mailto:DOTNET@[...].COM] On Behalf Of
Chad Osgood
Sent: Thursday, November 15, 2001 6:05 PM
To: DOTNET@[...].COM
Subject: [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.
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
|