C#: Monitoring copied or moved files with FileSystemWatcher

后端 未结 4 1301
醉梦人生
醉梦人生 2021-02-02 03:17

I have come across several \"solutions\" here and across the web but none seem to fit the bill.

What I am looking to do is have an app monitor a folder for new files (ei

4条回答
  •  隐瞒了意图╮
    2021-02-02 03:45

    Hmm interesting problem. I never used the object while watching for big files. Did a little searching and seems one solution is to monitor the Changed event as well. Because once the file is done copying (after created is fired) a changed event is thrown as well (cause the file increased in size)

    More details from what I read here: http://social.msdn.microsoft.com/forums/en-US/vblanguage/thread/f84bb7c8-b7d5-44da-b0f3-6d1a70415d11/

提交回复
热议问题