The ItemCompletion event is raised each time a FileSystemItem object has been completely processed by a method call, providing progression information to the handler and the ability to perform custom post-processing on the target item.
The ItemCompletion event provides a convenient way to perform custom actions on items being processed in a method call like CopyTo() or MoveTo() for example.
When the event is triggered, all actions of the source and target items have been completed.
To subscribe to the ItemProgression event, the following steps must be performed:
Create a reference to a FileSystemEvents object.
Subscribe to the ItemCompletion event of the FileSystemEvents object using the ItemProgressionEventHandler delegate class.
Create a new method that will handle the events that are raised.
Place the desired code in the newly created event handler.
This example demonstrates how to use the ItemCompletion event to clear the "read only" attribute from files extracted from a zip archive.