tags:

views:

31

answers:

2

Hi,

At this moment I have an application that processes a file. My workflow is:

  1. Someone puts a file in a FTP and notifies me
  2. I download the file and run my app with that file. It returns a proccessed file.
  3. I put the result in the FTP again and notify my workmate.

Is there any kind of trigger that executes my code when someone drops a file in the FTP?

+1  A: 

Yes, it totally depends on the FTP server and platform. There are FTP servers which do this. Others do not, but you could watch a directory for changes with inotify(). (On UNIX.)

Amigable Clark Kant
I can't watch the directory, the ftp server isn't allocated in my infrastructure :(
pablorc
+1  A: 

You'd be best served monitoring the destination folder for new files and triggering the execution from that. How you go about that would depend entirely on the language or framework your application is written in.

i.e. FileSystemWatcher (c#)

tKe