i used the filesystemwatcher as in the following code, but i want the path to include the specific file (RequestedList.txt) as i wrote, but it only works if pointed to a directory, how can i have it work when pointed to a file?
VB Code:
Dim mywatcher As New IO.FileSystemWatcher 'Create new instance of FileSystemWatcher mywatcher.Path = Application.StartupPath & "\RequestedList.txt" 'Specify Path to File or Directory. Which ever you need mywatcher.NotifyFilter = IO.NotifyFilters.LastWrite Or IO.NotifyFilters.LastAccess Or IO.NotifyFilters.FileName AddHandler mywatcher.Changed, AddressOf OnChanged AddHandler mywatcher.Created, AddressOf OnChanged 'Add handlers to catch certain events of certain types AddHandler mywatcher.Deleted, AddressOf OnChanged 'Use intellisense to see what others are open to you mywatcher.EnableRaisingEvents = True 'Start the process





Reply With Quote