errol stone

errol stone

  • NA
  • 1
  • 3.8k

File Watcher program

Sep 15 2011 5:12 AM
Hey!

I'm going to make a windows service file watcher program. What it going to happened is that some time during the first day of each month, files are going to be added to a directory on the web server. The files are going to look pretty much like this:
file_1_11.csv
file_2_11.csv
...
file_11_11.csv

So, when the eleventh(ie the last file. it can vary from month to month) file is copied to the directory, I want to start reading the files and add them to a database. I got the reading and the insertion to the database all sorted out, but I'm not really sure about how to start with the file watching. I've read some about it on the Internet, and I understand that there might be som problems using the built in FileSystemWatcher when working with multiple files. Anyone got an idea on how to attack this task?

Thanks
Suunker

Answers (2)