controlling ftp process from a shell script or c program

Russell T. Trotter trotter at ENUXHA.EAS.ASU.EDU
Mon May 20 13:53:08 AEST 1991


Newsgroups: comp.unix.wizards
Subject: controlling ftp process from a shell script or C program
Expires: 
References: 
Sender: 
Reply-To: trotter at enuxha.eas.asu.edu.UUCP (Russell T. Trotter)
Followup-To: 
Distribution: world
Organization: Arizona State Univ, Tempe AZ
Keywords: 


I am trying to find an intelligent way to transfer files from 
an ftp server to my account.  When I say intelligent I mean that
it must handle cases where the ftp connection times out, or some
other error occurs.  If there is a connection it should send the
userid and password, and issue the commands to get the files. The
problem I have when writing such a beast myself is that I know of no
way to get the result of say "ftp nowhere.edu", whether it connected
or timed out.  I tried doing this in C, but regardless if I got
connected or not, it would always remain in the ftp process (or
alway with an ftp prompt).  I did discover a way to pass commands
via the popen call from a C program, but the problem is WHICH command
I send.  Does anyone know of a way to get result status from commands
given from an ftp process (or any other process like this)?  I would
greatly appreciate any suggestions or comments.  Thank you.

trotter at enuxha.eas.asu.edu 



More information about the Comp.unix.wizards mailing list