473,394 Members | 2,071 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,394 software developers and data experts.

Creating multiple FileSystemWatchers in same application - how?

Hi!

I've made FileSystemWatcher application to copy files from one UNC-path
(\\server\directory) into another when files appears into source path. I
made it using link http://www.developerfusion.co.uk/show/3636/2/ and
it's working fine.

Now I should make more than one instances of the FileSystemWatcher class
to watch several UNC-paths, how to do this in the same application?

Now my application already saves paths to watch into xml-file, and this
xml-file is retrieved as datatable which is bound into datagrid. But my
problem is I can't figure out how to make FileSystemWatcher instance for
each of these path according DataTable path-list?

--
Thanks in Advance!

Mika
Nov 21 '05 #1
1 1834
You can do someting like this, foreach(row in Dastagrid)
FileSystemWatcher w = new FilesystemWatcher.....

And you construct all of the watchers you need without a trouble, I guest
that you will not have problems because having more that one FSW ;)

Regards,

Bela Istok

PD: The code it's not the final code is to give and Idea ;)
"Mika M" <ma***************@luukku.com> wrote in message
news:ux**************@TK2MSFTNGP10.phx.gbl...
Hi!

I've made FileSystemWatcher application to copy files from one UNC-path
(\\server\directory) into another when files appears into source path. I
made it using link http://www.developerfusion.co.uk/show/3636/2/ and it's
working fine.

Now I should make more than one instances of the FileSystemWatcher class
to watch several UNC-paths, how to do this in the same application?

Now my application already saves paths to watch into xml-file, and this
xml-file is retrieved as datatable which is bound into datagrid. But my
problem is I can't figure out how to make FileSystemWatcher instance for
each of these path according DataTable path-list?

--
Thanks in Advance!

Mika

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Altramagnus | last post by:
I have 30 - 40 type of different window. For each type I need about 20 instances of the window. When I try to create them, I get "Error creating window handle" My guess is there is a maximum...
0
by: AIMTech | last post by:
We have an IIS+ASP based application server that is capable of providing complex reports to hundreds of users but in some circumstances these reports can take a long time to create. However the...
3
by: epigram | last post by:
I've been creating some toy ASP.NET apps in an effort to understand the technology. I've something odd with regards to project/solution creation. If you create a new asp.net application, it...
3
by: Nathan Sokalski | last post by:
When I view any page in my application a second time, I recieve the following error: System.Web.TraceContext.AddNewControl(String id, String parentId, String type, Int32 viewStateSize) +313...
3
by: Vidit | last post by:
Hi I keep getting the error "Error Creating Windows Handle" in my application and different places in the code. This occurs only to certain users. Its very random and cannot be reproduced in...
1
by: Fredrik Johansson | last post by:
Hello, I have built a .NET remoting solution (SingleCall) that writes a file to disk, then waits for a second file in a specified folder (using the FileSystemWatcher.WaitForChanged method). When...
12
by: Mats Lycken | last post by:
Hi, I'm creating a CMS that I would like to be plug-in based with different plugins handling different kinds of content. What I really want is to be able to load/unload plugins on the fly without...
5
by: John Scott | last post by:
Ok..this a rather odd question/problem. I haven't really found a straight forward answer to how to handle this scenario, so I hope someone here can help. Here it is: I have an application...
1
by: D2 | last post by:
Hi All, I'm just wondering whether a FileSystemWatcher object can be used to monitor multiple directores or we have to create one FileSystemWatcher object for each folder we need to monitor? ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.