Programmatically refresh Windows Explorer (not IE) window
- by awj
I'm using a Windows Service to do some directory cleaning (implementing a FileSystemWatcher).
The problem I'm having is that sometimes, when several files in a directory are deleted, one of the files still shows in the Explorer window. If you refresh the window the file disappears. Similarly, if you right-click on it or try to copy it, a pop-up informs that it no longer exists.
So what I'd like to know is: is there any way I can programmatically refresh the view of the Explorer window?