I am coding in c# using filesystem watcher to check a directory. How can I say "after 8:00 am if file X is not existing do ....." ?, this have to be verified every day. Thanks for your help !
Make an event when a file as not arrived after a certain time
95 Views Asked by francops henri At
2
I don't think you need a
FileSystemWatcherhere. Simply use aTimeror Scheduled tasks which runs at 8:00, then check for your file exist and get the job done.Timer can be used if your application will be running all the time throughout the day 24 x 7, otherise use latter.
FileSystemWatcheris something, that we use to get notifications about change in the file system anytime and not for checking something exist at particular time.Update: You can use the
FileSystemWatcherto get the file update immediately, then process it and also theTimermentioned above which finds whether file hasn't been created till 8.00.