I have to create a Windows service which monitors a specified folder for new files and processes it and moves it to other location.
I started with using FileSystemWatcher. My boss doesn’t like FileSystemWatcher and wants me to use polling by using a Timer or any other mechanism other than FileSystemWatcher.
How can you monitor directorying without using FileSystemWatcher using .NET framework?
Using @Petoj’s answer I’ve included a full windows service that polls every five minutes for new files. Its contrained so only one thread polls, accounts for processing time and supports pause and timely stopping. It also supports easy attaching of a debbugger on system.start