Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

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

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft