Hi Eran:
It's really pretty simple
1) Build a temporary text file (e.g. /tmp/mycmds) that looks like this using fprintf's
open remote_hostname
user this_user this_user_password
ls (put get etc. go here)
quit
2) Create a temp output filename. e.g. my_out_fname
2) Then build a command string
e.g. sprintf(s_cmd,"ftp -n -i < %s > %s",my_tmp_cmd_fname,my_out_fname)
3) result = system(s_cmd)
OR
you could also use a popen to execute ftp.
Regards, Clay
If it ain't broke, I can fix that.