How to detect if there is any file added in a folder?
问题 Is it a way to detect if there is any file added in a folder? Include the sub-folder. For example, check if any text file *.txt is added in folder c:\data-files\ or its sub-folders. The folder can be shared folder of another machine too. 回答1: Perhaps you are confused on the types of events that are triggered: http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher_events(v=vs.110).aspx This should work, taken from the link above and modified for your requirements: #By BigTeddy 05