FileSystemWatcher any experts here?

D

DWalker

I need to monitor a folder to see when a file that is being FTP'ed into the
folder is finished.

I have looked at the doc for the FileSystemWatcher and the Created event.
It's not clear from the doc whether that event is fired when the file is
first created (sounds like it is), but I need some way to know when the FTP
transfer into the directory is FINISHED. As in, the file is closed or
something. Does closed correspond to created?

Is there a way to do this? Am I missing something?

Thanks.

David Walker
 
T

Tim

can you check if the file is "in use"?
the ftp client will keep the file in use until the upload is complete.
 
G

Guest

Maybe you could do something with the Attributes Monitor by looking at...

NotifyFilters.Attributes.LastWrite
NotifyFilters.Attributes.LastAccess
NotifyFilters.Attributes.Size

....I don't know how or if they update during the FTP process but if say size
and writetime do not change over x period then the file is complete.

Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top