Re: [DOTNET] Monitoring "last write" for a given file
by Dunne, Joe other posts by this author
Nov 15 2001 9:25PM messages near this date
Re: [DOTNET] C# Office add-in woes
|
Re: [DOTNET] Monitoring "last write" for a given file
Chad,
Last time I had a similar problem I got the other side to send two files,
the second containing no data. Detect the second file (known naming
convention with timestamp) and you know the first is already uploaded.
HTH
joe
-----Original Message-----
From: Chad Osgood [mailto:cosgood@[...].COM]
Sent: Thursday, November 15, 2001 5: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:
Dunne, Joe
Chad Osgood
|