473,322 Members | 1,690 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Polling a file

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
2 1136
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Daniel Mueller | last post by:
Hello Fellow Python Programmers, I have the following problem: i want to read the content of a file every 10 seconds. now what is the best funktion to do that? to open the file, read it and...
0
by: Vijay Varadan | last post by:
We're using Enterprise Application Block June 2005 w/ Visual Studio 2003 .NET. We've configured our ASP.NET web service to run under a specific domain account using the instructions at...
1
by: Daniel Bass | last post by:
hey guys. overview --------- I'm designing a messaging system that works on the principle of late binding to the I/O objects, depending on the .Net class libraries present in the local folder....
2
by: johnmmcparland | last post by:
Hi all, I used the class on CodeGuru to play wav files; http://www.codeguru.com/csharp/csharp/cs_graphics/sound/article.php/c6143/ In my application however I play a number of wav files in a...
1
by: engwar | last post by:
Is anyone aware of any freely available software written in a .Net language for adding polling features to an existing website? I'm looking for just a polling component and not interested in...
1
by: kelvin.jones | last post by:
Hi guys, I have read several discussions on this group (and others) that talk about polling a server using ajax transactions and if it is possible to push to the client. The general consensus seems...
5
by: Mike | last post by:
Hi everyone, I would like to be able to send updates to my web page from the server. If I understood correctly, this is not possible to achieve in a web environment, unless some sort of polling...
13
by: LordHog | last post by:
Hello all, I have a little application that needs to poll a device (CAN communications) every 10 to 15 ms otherwise the hardware buffer might overflow when there are message burst on the bus. I...
4
by: sid | last post by:
Can someone tell me how to detect "Action Cancelled" page with out polling. I have a frame set and I want to make sure the other frame is displaying what it is supposed to without polling. For...
3
by: Chris Mullins [MVP - C#] | last post by:
I'm sitting on the fence on this one, and wanted to get some other people's input. If you're a big B2B person, I would love to hear your feedback... I've got a SOA system. It's based on a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.