By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,870 Members | 1,189 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,870 IT Pros & Developers. It's quick & easy.

Polling a file

P: n/a
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.

Apr 17 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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

--
Newbie Coder
(It's just a name)

"Distalgesic" <uo*****@hotmail.comwrote in message
news:11**********************@b58g2000hsg.googlegr oups.com...
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.

Apr 17 '07 #2

P: n/a
I think that this will help u
http://www.Planet-Source-Code.com/vb...txtCodeId=6366
1&lngWId=1

*** Sent via Developersdex http://www.developersdex.com ***
Nov 24 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.