Programmatically refresh Windows Explorer (not IE) window

Posted by awj on Stack Overflow See other posts from Stack Overflow or by awj
Published on 2010-04-11T13:00:20Z Indexed on 2010/04/11 13:03 UTC
Read the original article Hit count: 169

Filed under:
|
|

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?

© Stack Overflow or respective owner

Related posts about explorer

Related posts about c#