How can I detect if a directory is renamed? FileSystemWatcher doesn’t seem to want to do this.

FileSystemWatcher works OK with files that have been renamed but it wont fire the RenamedEventHandler when a directory is renamed.

Can I use DirectoryInfo to see if a directory or a subdirectory is renamed? Or is polling the only answer? I need to see some examples of how I could do it.

Thanks.

by privatly via /r/csharp

Leave a Reply