fork and exec ftp

Hi,

I need to find/implement an application that FTPs (puts) all new files in a certain directory to an external storage unit. This application should check for new files every 10 seconds (leaving the FTP connection open in between the 10 seconds).

The easiest way would be if there are programs that I can use on solaris to accomplish this (I know some on Windows, but none on solaris).

Or maybe it can be done with scripts ? (I have no experience with that)

Or I could (in C++) fork and exec (solaris ftp) and use 2 pipes to communicate between my parent process and the ftp. But I'm not sure if it's possible to catch the output of the solaris ftp in a pipe, so that I can use it in my parent process. Until now I've only used uni-directional communication between parent and child process.

I hope to get some ideas on what you think is the best way to do this.
Thanks.

Hi KittyJ,
for the synchronization of to servers I use the LFTP tool.
It is a free tool on Freeware for Solaris there are all features you want, except the one with the open ftp connection.

Maybe the feature is implemented but I never use it !?
Look at :
LFTP - sophisticated file transfer program

best regards joerg

Hi,

When looking into the lftp, I found out about curl (inlcluding libcurl).
Seems at first site even better than lftp.

Does anyone know both of them and how do they compare ?