Hello Everyone,
Alright so currently I am able to monitor files on my C:\Files\ and whenever a file is created and placed in it, I am able to transfer it immedietely to a network drive's \\network\Files\ folder. That works perfectly using filesystemwatcher. However, the problem I am encountering is the network drive goes down quite frequently, I don't know when.
I would like to modify my program so that it keeps checking if the network drive is available, and if it is, it will copy the file from C:\Files\ on my computer. If not, it will just keep trying to copy.
I have successfully implemented this using a while loop delay and thread.Sleep in my
static void watcher_created(object sender, FileSystemEventArgs e) method. However both ways are quite resource unfriendly. I was told to use System.Threading.Timers. How would I implement this.
Thank you very much for any help you are able to provide.