File System Watcher: File Folder Created : File System Watcher « File Directory « VB.Net






File System Watcher: File Folder Created

 
Imports System
Imports System.IO

Public Class MainClass
   Shared Private WithEvents m_FileSystemWatcher As FileSystemWatcher

   Shared Sub Main()
        m_FileSystemWatcher = New FileSystemWatcher("C:\")
        m_FileSystemWatcher.EnableRaisingEvents = True
   End Sub 
    ' Watch for file creations.
    Shared Private Sub m_FileSystemWatcher_Created(ByVal sender As Object, ByVal e As System.IO.FileSystemEventArgs) Handles m_FileSystemWatcher.Created
        Console.WriteLine(e.FullPath & " created")
    End Sub

End Class

           
         
  








Related examples in the same category

1.File System Watcher: file updated, created
2.File Watcher