Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FileSystemWatcher...

Status
Not open for further replies.

Ajb2528

Technical User
Feb 22, 2002
270
0
0
GB
Hi!

Is there any way of detecting the user that has made any changes using the FileSystemWatcher?

Any help will ber appreciated!

Regards,

Alan
 
There are several events that FileSystemWatcher has.
Catch the changes in any event. In addition, check the System.IO.FileSystemEventArgs value (in 2005it is [blue]ByVal e As System.IO.FileSystemEventArgs[/blue] by default).
Example:
Code:
Private Sub FileSystemWatcher1_Created(ByVal sender As Object, ByVal e As System.IO.FileSystemEventArgs) Handles FileSystemWatcher1.Created
   Select Case e.ChangeType
     Case IO.WatcherChangeTypes.Created
        MsgBox("Created")
     Case Else
        MsgBox("Other ChangeType")
   End Select
End Sub

Good luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top