[Solved]
I have a FileSystemWatcher ( fsw1 )
And
My Full Code :
The problem i have is with Changed events whenever I edit a text file it doesnt show "test.txt" has been edited just shows file "Test" has been modified is their anyway to do this ?
- Had to put IncludeSub Directory's to True
I have a FileSystemWatcher ( fsw1 )
And
- Listbox 1
- Listbox 2
- Listbox 3
- Listbox 4
- Textbox1 ( Enter Path of location )
- FolderBrowserDialog1 ( fbd1 )
- Button1 ( Browse for path )
My Full Code :
PHP Code
<?php
Public Class Form1
Private Sub fsw1_Renamed(ByVal sender As Object, ByVal e As System.IO.FileSystemEventArgs) Handles Fsw1.Renamed
ListBox1.Items.Add("File- " & e.FullPath.ToString & " renamed at: " & System.DateTime.Now)
End Sub
Private Sub fsw1_Created(ByVal sender As Object, ByVal e As System.IO.FileSystemEventArgs) Handles Fsw1.Created
ListBox2.Items.Add("File- " & e.FullPath.ToString & " created at: " & System.DateTime.Now)
End Sub
Private Sub fsw1_Deleted(ByVal sender As Object, ByVal e As System.IO.FileSystemEventArgs) Handles Fsw1.Deleted
ListBox3.Items.Add("File- " & e.FullPath.ToString & " deleted at: " & System.DateTime.Now)
End Sub
Private Sub fsw1_Changed(ByVal sender As Object, ByVal e As System.IO.FileSystemEventArgs) Handles Fsw1.Changed
ListBox4.Items.Add("File- " & e.FullPath.ToString & " modified at: " & System.DateTime.Now)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
fbd1.ShowDialog()
TextBox1.Text = fbd1.SelectedPath
Fsw1.Path = TextBox1.Text
MsgBox("Path to monitor is now set to: " & TextBox1.Text)
End Sub
End Class
The problem i have is with Changed events whenever I edit a text file it doesnt show "test.txt" has been edited just shows file "Test" has been modified is their anyway to do this ?
