question

codequestion-8544 avatar image
0 Votes"
codequestion-8544 asked karenpayneoregon answered

Catch events of moving folders inside watched directory with FileSystemWatcher

Hello guys,
Im using FileSystemWatcher to watch C:/temp directory, the watched directory contains 2 Folders e.g:test1, test2.
test2 contains a text file. Now if i cut-paste or move test2 into test1 i can't see any events triggered. any one know a way i can catch those events?

If i cut-paste or move a folder with a text file into the watched directory from outside its trigger events.
Thanks.
hope you guys can help me :)


dotnet-csharp
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

karenpayneoregon avatar image
0 Votes"
karenpayneoregon answered

The following project has been tested for monitoring a folder and sub folders for new text files, when detected moves them to a target folder. Done with .NET Framework 4.8, have not tried with .NET Core 5.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.