>Hello all,
>
>I wasn't sure how to classify this question, but I have a situation where I want to have a process (already written) run when a file is populated into a directory on my server. Basically, it is an import process that takes a file and loads it into the database. The file will be sent to the directory by partners via FTP.
>
>How should I create this? Should I create some kind of 'listener' process (if so, how is this accomplished?) that kicks off the import process when a file exists or create a console app that runs every minute or so and checks for the existence of said file in the directory and then run the import process when the file exists?
>
>If I do the latter, then this job will run over and over again to load a file that I get once a week.
>
>All suggestions are appreciated.
Probably the best solution would be a Windows service which uses the FileSystemWatcher class.
http://msdn.microsoft.com/en-us/library/d56de412(v=vs.80).aspxhttp://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspxUPDATE: | see that Bruce & Craig have already suggested the two parts......