Get Name Of FileSystemWatcher 
Author Message
 Get Name Of FileSystemWatcher

Hi

I have setup a collection of filesystemwatchers, which get dynamically
created from a list in a database. Each filesystemwatcher is setup with
event handlers to watch for file changes, and each event handler logs the
details to the database. I now need to get the name of the filesystemwatcher
that is creating the event, so I can tie all the records together...

I have checked the sender object, but cant find any identifiers to find the
name of the filesystemwatcher. The only other workaround I can think of is
to get the path of the updated file and then look up in the database for
matches to find the correct filesystemwatcher...

Any help will be greatly appreciated...

Frank



Fri, 26 Aug 2005 16:06:14 GMT  
 Get Name Of FileSystemWatcher

Quote:
> I have setup a collection of filesystemwatchers, which get
> dynamically created from a list in a database. Each
> filesystemwatcher is setup with event handlers to watch for file
> changes, and each event handler logs the details to the
> database. I now need to get the name of the filesystemwatcher
> that is creating the event, so I can tie all the records
> together...

> I have checked the sender object, but cant find any identifiers
> to find the name of the filesystemwatcher. The only other
> workaround I can think of is to get the path of the updated file
> and then look up in the database for matches to find the correct
> filesystemwatcher...

A filesystemwatcher does not have a name. You could add a name by deriving
your own class from filesystemwatcher and adding a Name property.

Armin



Fri, 26 Aug 2005 19:03:09 GMT  
 Get Name Of FileSystemWatcher
The sender object should have a name property.
Quote:
>Subject: Get Name Of FileSystemWatcher

>Date: 10/03/03 08:06 GMT Standard Time

>Hi

>I have setup a collection of filesystemwatchers, which get dynamically
>created from a list in a database. Each filesystemwatcher is setup with
>event handlers to watch for file changes, and each event handler logs the
>details to the database. I now need to get the name of the filesystemwatcher
>that is creating the event, so I can tie all the records together...

>I have checked the sender object, but cant find any identifiers to find the
>name of the filesystemwatcher. The only other workaround I can think of is
>to get the path of the updated file and then look up in the database for
>matches to find the correct filesystemwatcher...

>Any help will be greatly appreciated...

>Frank



Sun, 04 Sep 2005 07:03:29 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. FileSystemWatcher name by sender

2. Getting table names without actually knowing their names...

3. getting users name and workstation name Urgent

4. Getting name from Domain Name Server in VB?

5. Getting short file name from long file name:

6. Getting the user's logon name and computer name

7. Getting table names without actually knowing their names...

8. Getting table names without actually knowing their names...

9. Getting table names without actually knowing their names...

10. Getting Machine Name/Login Name

11. Getting a file name

12. Getting Excel worksheet names using DAO.

 

 
Powered by phpBB® Forum Software