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

Home Posts Topics Members FAQ

FileSystemWatch er with multiple folders

D2
Hi All,

I'm just wondering whether a FileSystemWatch er object can be used to
monitor multiple directores or we have to create one FileSystemWatch er
object for each folder we need to monitor?

I want to monitor multiple folders like:

c:\windows
c:\my docs
d:\my pictures

etc.

Thanks,
D2

May 4 '07 #1
1 2799
D2,

If all you had to do was monitor sub directories, then no, you could use
one FileSystemWatch er for this. However, you need multiple
FileSystemWatch ers in this case.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"D2" <dh*****@gmail. comwrote in message
news:11******** **************@ u30g2000hsc.goo glegroups.com.. .
Hi All,

I'm just wondering whether a FileSystemWatch er object can be used to
monitor multiple directores or we have to create one FileSystemWatch er
object for each folder we need to monitor?

I want to monitor multiple folders like:

c:\windows
c:\my docs
d:\my pictures

etc.

Thanks,
D2

May 4 '07 #2

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

Similar topics

3
9472
by: Michael Stanbrook | last post by:
I'm using the FileSystemWatcher to looks for new files arriving in a directory. Files are coming in via FTP and tend to be larger is size (> 1MB at least). I would like to fire an event once the file is completely written. I understand there is nothing "exactly" like that due to how the OS filesystem works, so I am looking for a workaround. I am currently attempting to open the "new" file in
1
330
by: Ryan Rogers | last post by:
Does The Filesystemwatcher class work though a DFS??
1
2170
by: Rich Miller | last post by:
Previously posted on the VB newsgroup with no replies, so any ideas appreciated. I have written a service application in VB (VS.Net 2003). On start, the service creates an object that instantiates a System.IO.FileSystemWatcher like so (the _watcher is declared at the class level as Private and no WithEvents): ' construct the file watcher _watcher = New FileSystemWatcher _watcher.Path = WatchPath _watcher.NotifyFilter =...
1
1821
by: Terry | last post by:
I have created a Windows Service application which uses FileSystemWatcher to monitor multiple folders and file filters. These folders/files are loaded from a database table. When a Change Event kicks off, how can I determine which of the FileSystemWatcher instances it is for? Terry
2
1985
by: kmcnet | last post by:
Hello Everyone and thanks for your help in advance. I have been battling a problem for nearly a month with the FileSystemWatcher component. Basically, what I am trying to do it to monitor three separate folders on a Windows 2000 server for activity. In my code, I have set up three separate subroutines: FaxWatch() ReportWatch() ScheduleWatch() Each of the subroutines creates a new instance of the FileSystemWatcher.
0
927
by: Li Pang | last post by:
Hi, I used FileSystemWatcher object to audit the files/folders on several servers with the below event handlers: AddHandler watcher.Changed, AddressOf OnChanged AddHandler watcher.Created, AddressOf OnCreated AddHandler watcher.Deleted, AddressOf OnDeleted AddHandler watcher.Renamed, AddressOf OnRenamed It works fine for the files/folders in the local server but doesn't work
0
1295
by: Gerard | last post by:
Hi, I have written an application that needs to monitor changes to a synchronized offline folder while the user is *not* connected to the network. I have used the FileSystemWatcher and it works beautifully while the user is connected to the network, however as soon as they are in an offline state the FileSystemWatcher ceases to receive any events. I can't find any documentation regarding file system events in offline folders, does...
3
9794
by: emailtonitin | last post by:
I am facing a design issue in my code related to the filesystemwatcher's filter property. I figured out that the filter won't accept multiple patterns for eg. "*.txt, *.csv" don't work. To workaround this issue, I have 2 options: 1. To create multiple instances of filesystemwatcher class and hook all of them to the same event handlers. 2. To use 1 instance of filesystemwatcher to listen to all files using blank filter. And in the event...
1
4336
by: SoxFan44 | last post by:
Hi, What's the best way to watch several directories (not sub dirs) with FileSystemWatcher? Should I create an array of them, vector, or something else? Also, performance-wise, how many directories can I watch on a decent computer, say low P4 512 MB RAM? Thanks!
0
8448
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
8356
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8871
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8783
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...
1
8552
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8640
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7387
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
6198
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...
2
1776
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.