#include <afxinet.h>
//assumes server and file names have been initialized
CInternetSession session("My FTP Session");
CFtpConnection* pConn = NULL;
pConn = session.GetFtpConnection(lpszServerName);
//get the file
if (!pConn->PutFile(pstrLocalFile, pstrRemoteFile))
//display an error
delete pConn;
session.Close();