pablorc
pablorc

Reputation: 950

Trigger for FTP files

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?

Upvotes: 1

Views: 3558

Answers (2)

tKe
tKe

Reputation: 560

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#)

Upvotes: 2

Prof. Falken
Prof. Falken

Reputation: 24887

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.)

Upvotes: 2

Related Questions