I'm learning how to use FileSystemWatcher in C# and I'm following the example here:
https://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher%28v=vs.110%29.aspx
I'm not sure what is happening but when I rename a file, for example, FileSystemWatcher occasionally reports that it's in the "../Documents/Outlook 2007" directory (where I have the .pst file) when clearly it is not. Is this because I've got Outlook open at the time. How can I stop FileSystemWatcher doing that? Should I use a query with e.OldFullPath to make sure if the old file name is in that directory first or would that use up too much system resources?
I'm using Visual Studio Community 2013 on Windows 8.1 and I've got Outlook 2007.
Thanks.
https://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher%28v=vs.110%29.aspx
I'm not sure what is happening but when I rename a file, for example, FileSystemWatcher occasionally reports that it's in the "../Documents/Outlook 2007" directory (where I have the .pst file) when clearly it is not. Is this because I've got Outlook open at the time. How can I stop FileSystemWatcher doing that? Should I use a query with e.OldFullPath to make sure if the old file name is in that directory first or would that use up too much system resources?
I'm using Visual Studio Community 2013 on Windows 8.1 and I've got Outlook 2007.
Thanks.