473,666 Members | 2,617 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating multiple FileSystemWatch ers in same application - how?

Hi!

I've made FileSystemWatch er application to copy files from one UNC-path
(\\server\direc tory) 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 FileSystemWatch er 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 FileSystemWatch er instance for
each of these path according DataTable path-list?

--
Thanks in Advance!

Mika
Nov 21 '05 #1
1 1850
You can do someting like this, foreach(row in Dastagrid)
FileSystemWatch er w = new FilesystemWatch er.....

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******** ******@TK2MSFTN GP10.phx.gbl...
Hi!

I've made FileSystemWatch er application to copy files from one UNC-path
(\\server\direc tory) 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 FileSystemWatch er 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 FileSystemWatch er 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
561
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 number of window handle, because if I reduce to about 2 instances of each window, it can run. But not 20 instances of each window. Does anyone know what the problem is? is it really because it exceeds the maximum number of window handle?
0
1278
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 data for the report is cached so subsequent calls to view the same report come back with a sub-second response time. In order to make use of this caching we pre-prepare some of the reports by getting back a list of potential users from the server...
3
1951
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 appears that the project files get created in the URL specified Location field on the New Project dialog box. This makes sense to me. What is confusing is that the solution file gets created in a folder with the same name as the location folder (the...
3
2781
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 System.Web.UI.Control.BuildProfileTree(String parentId, Boolean calcViewState) +201 System.Web.UI.Control.BuildProfileTree(String parentId, Boolean calcViewState) +263
3
8322
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 the development environment. I have an applicatin error logger which shows this error occuring (in the stack trace dump) but it again occurs at different locations in the code and occurs inconsistently. My application is a windows forms...
1
1813
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 the component is called by two peers at the same time, two FileSystemWatchers are created (one for each peer). They are both monitoring the same path (but for different files - using different filters). The following code illustrates the...
12
3153
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 restarting the application. What I did was to create an AppDomain that loaded the plugins and everything was great, until I tried to pass something else that strings between the domains...
5
8699
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 that allows users to log in. Each user can have multiple roles within the application. Each role allows the user to access different sections of the app and allows/denies them certain functionality.
1
2800
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? I want to monitor multiple folders like: c:\windows c:\my docs
0
8454
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8787
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7389
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6203
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4200
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2776
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2013
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.