Questions tagged [filesystemwatcher]

FileSystemWatcher is a .NET component class that listens to the file system change notifications and raises events when a directory, or file in a directory, changes.

The System.IO.FileSystemWatcher component class can be used in .NET applications to watch for changes in a specified directory. You can watch for changes in files and subdirectories of the specified directory. These changes can be observed on a local computer, a network drive, or a remote computer.

The Filter property can be set with a string value indicating which files and/or directories are to be watched for changes.

1220 questions
-3
votes
1 answer

Is filesystemwatcher detectable?

i wanna ask you if is filesystemwatcher detectable. for example. i wanna read and analyse log file parallel with using software. So is it detectable? TY.
Marek Schwarz
  • 350
  • 5
  • 13
-3
votes
1 answer

The process cannot access the file because it is being used by another process when I count

I've build a File System Watcher solution, and, I would to retrieve the changes made on log file, extracting only the added line, but I can not in this because I always error that the process cannot access the file because it is being used by…
Gianni Giordano
  • 143
  • 1
  • 2
  • 13
-3
votes
1 answer

Update UI control by FileSystemWatcher

Im having some problems in my code: private void start_watcher() { fswFiler = new FileSystemWatcher(Control.filer.get_path(),"*.*"); //fswStorage = new FileSystemWatcher(Control.storage.get_path()); fswFiler.Changed +=…
nadav
  • 552
  • 5
  • 11
-4
votes
1 answer

How to code: if (e.ChangeType == 'Created') do something, when using FileSystemWatcher?

My goal is to code the following.. If change type is created do this, if it is deleted do that. How is this done? This is what I have tried.. private static void directoryChange(object source, System.IO.FileSystemEventArgs e) { …
C-Sharpsz
  • 45
  • 7
-5
votes
1 answer

Best practice for to count text line

I would to know how I can read, for example, line from 10 to 12, in a log file, starting from upper of file, without having the message that the process cannot access the file because it is being used by another process. Thanks a lot
Gianni Giordano
  • 143
  • 1
  • 2
  • 13
1 2 3
81
82