0

I have a external FTP and I need to process file as soon as it it uploaded into it.

I have researched and found these working solutions.

FileSystemWatcher for FTP

I see the only way to do this is using a polling mechanism by using a timer or a windows service to check the FTP for a specific interval.

Would there be any solution exactly like .NET FilesystemWatcher, which triggers a method as soon as the file is uploaded into ftp?

Ftp file watcher like SystemFileWatcher in .net? -> Seemed similar, but doesnt quite answer my question.

Community
  • 1
  • 1
wickjon
  • 900
  • 5
  • 14
  • 40
  • 1
    I think that question answers your question; there would be no way without polling it since it is an external source. You could create a thread for each file and have a timer on each thread which polls files separately. – Kcvin Dec 18 '14 at 06:32
  • I suppose if you were in control of FTP SERVER implementation, you could notify your client (either through custom extension to the protocol or simply dropping connection). But as the question goes, you need to define with the business owner what limitations to 'as soon as' they are prepared to accept (nanoseconds, milliseconds, minutes, days etc.) and then implement a periodic polling. Mind you, this implementation would bear a significant overhead so again you'd need to agree with the business owner on the acceptable levels. – zaitsman Jan 04 '15 at 09:56

0 Answers0