Is there a way to detect deletion of a file before windows performs the deletion? I found FileSystemWatcher class but the event is raised only after the delete action is per
Or may try ICopyHook interface.
http://msdn.microsoft.com/en-us/library/windows/desktop/bb776049%28v=vs.85%29.aspx
In CopyCallback method use FO_DELETE in wFunc parameter, to specify delete operation.
Disadvantage: Only prevent deletion in Windows Shell.