FileSystemWatcher.Renamed Event

 

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

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

[<IODescriptionAttribute("FSW_Renamed")>]
member Renamed : IEvent<RenamedEventHandler,
    RenamedEventArgs>

Renaming the directory you are watching will not raise a notification. Notifications are only raised for entries inside the directory you are watching.

The following example uses the Renamed event to display the file path to the console whenever the watched file is renamed.

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

.NET Framework
Available since 1.1
Return to top
Show: