Transfering file using FTP in C++ program dynamically

adimallee
adimallee used Ask the Experts™
on
Hi,

 How to transfer a file from a client to a server using FTP in a VC++ Program dynamically. That is while in run time we should write a data to a file in a c++/vc++ program and then in the same program we have to transfer that file to a FTP server. That is this program should act as a FTP client program. Please help me to solve the above problem.

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
At the server side, the ftp server should be listening on port 21.
At the client side:
1. Start your program.
2. Get the filename to create/update.
3. Create/Update the file.
4. Close the File pointer.
5. Open and connect to ftp server on port 21.
6. Send the login info.
7. Send the file contents to the server.
8. Close connection.

The above algorithm will send a file created at run time from a ftp client to a ftp server.
Is this what you wanted. If not, please clarify...

Commented:
Dear expert(s),

A request has been made to close this Q in CS:
http://www.experts-exchange.com/Community_Support/CleanUp/Q_20442410.html

Without a response in 72 hrs, a moderator will finalize this question by:

 - Saving this Q as a PAQ and refunding the points to the questionner

When you agree or disagree, please add a comment here.

Thank you.

modulo

Community Support Moderator
Experts Exchange
Commented:
Saving this Q as a PAQ and refunding the points to the questionner

modulo

Community Support Moderator
Experts Exchange

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial