K
Ken Madden
I want to create multiple fileSystemWatchers in a Windows Service to
constantly watch multiple folders for file creations and then execute
certain code based on these actions. The problem is that these directories
are not part of the same directory so I cannot use the subfolder flag. The
number of folders also has to be dynamic so I cannot simply create a certain
number of FileSystemWatchers with different paths. I am going to pull a
list of paths from an XML config file and create a FilesystemWatcher for
each flag. I tried creating a FilesystemWatcher in a thread thinking that I
could simply iterate through the paths creating an FSW for each path. But
when I do this, the FSW gets created, verified through Event log entries,
but nothing happens when a file is created.
Can anyone point me in the right direction? I cannot find any articles
regarding this. I found one article that really seemed like what I was
trying to do but, of course, the article was no longer available.
Thanks,
Ken
constantly watch multiple folders for file creations and then execute
certain code based on these actions. The problem is that these directories
are not part of the same directory so I cannot use the subfolder flag. The
number of folders also has to be dynamic so I cannot simply create a certain
number of FileSystemWatchers with different paths. I am going to pull a
list of paths from an XML config file and create a FilesystemWatcher for
each flag. I tried creating a FilesystemWatcher in a thread thinking that I
could simply iterate through the paths creating an FSW for each path. But
when I do this, the FSW gets created, verified through Event log entries,
but nothing happens when a file is created.
Can anyone point me in the right direction? I cannot find any articles
regarding this. I found one article that really seemed like what I was
trying to do but, of course, the article was no longer available.
Thanks,
Ken