The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

FileSystemWatcher.Changed Event


Occurs when a file or directory in the specified Path is changed.

Namespace:   System.IO
Assembly:  System (in System.dll)

member Changed : IEvent<FileSystemEventHandler,

The Changed event is raised when changes are made to the size, system attributes, last write time, last access time, or security permissions of a file or directory in the directory being monitored.


Common file system operations might raise more than one event. For example, when a file is moved from one directory to another, several OnChanged and some OnCreated and OnDeleted events might be raised. Moving a file is a complex operation that consists of multiple simple operations, therefore raising multiple events. Likewise, some applications (for example, antivirus software) might cause additional file system events that are detected by FileSystemWatcher.

Use NotifyFilter to restrict the number of notifications raised when this event is handled.


The Changed event is raised unexpectedly when a file is renamed, but is not raised when a directory is renamed. To watch for renaming, use the Renamed event.


The order in which the Changed event is raised in relation to the other FileSystemWatcher events may change when the SynchronizingObject property is not null.

The following example uses the Changed event to display the file path to the console whenever the watched file is changed.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
© 2015 Microsoft