ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> DevelopMentor-dotNET
DevelopMentor-dotNET
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved