Mst137 Mst137 - 1 year ago 120
C Question

Using FTP client to send file to FTP server

I would like to create a C program to send a .xml file to a FTP server which I have been given the username and password to periodically. What would be the easiest way to do this?

One idea I had was to just create strings containing the instructions and execute these using

however I have not used FTP before so do not know the correct commands to do so. Is there a better way to go about this? Or if this way is valid what commands would i use to send the file via FTP.

Answer Source
 ftp -u local-file.txt

Probably lftp is a better choice here.

lftp ftp://user:password@host  -e "put; bye"
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download