Polling a file

  • Thread starter Thread starter Distalgesic
  • Start date Start date
D

Distalgesic

I need to monitor a folder for files being dropped in and then process
the file and remove it from the folder.

I have got filesystemwatcher working OK for the files coming in, but I
can't seem to find a reliable method of telling me when the file has
stopped being copied in. Currently I'm doing a try/catch while opening
the file to see when I can get a hold of it but there must be a more
elegant method. I've looked at comparing file sizes, date and times
etc but with no luck.

Any ideas.
 
Distalgesic,

Create a new Event Handler for the file copy process & use that or if you
are copying byte for byte you can then handle it that way because when the
last byte has finished you can then pass that infformation on
 
Back
Top