PDA

View Full Version : How can we upload files on FTP server with a single command in C


Nupur
07-06-2006, 09:27 AM
Hi,

Having a query.....can we upload files to the ftp server.., or suppose to some remote.... with the help of a batch file (or script) or through a single command in c...??????

In this batch file we need to first give loginname , passwrd n then the c ommand to upload. But is there any way that this can be done without using any file or script???? just through a command???

plz help me out....

Thnks in advance

morongo
07-07-2006, 08:31 AM
You can write a batch file (or program in any language) that *calls* an ftp client and logs on to the server of your choice, but I know of no way to circumvent having to get a socket, connect to a server, authenticate and establish a dialog via ftp protocol in order to upload a file *using* that protocol.

The above is given that the particular client you choose allows command line argument passing.

There are several open source ftp clients available that you could modify to handle a scenario like the one above, if you don't already have one in mind.

You're basically just writting a 'wrapper' for a network client.

Nupur
07-10-2006, 07:01 AM
Thanks