How to copy a folder in FTP
-
I checked many functions to do the same but i could not... i want the help to copy a folder and a file to another folder using a FTP connection... can any one help to do the same...awaiting your reply
-
I checked many functions to do the same but i could not... i want the help to copy a folder and a file to another folder using a FTP connection... can any one help to do the same...awaiting your reply
Vivek krishna wrote:
. i want the help to copy a folder and a file to another folder using a FTP connection... can any one help to do the same...awaiting your reply
there is no such function exist in Unmanaged VC++. you have to implement the logic urself for same, i.e. you have to create directory on remote servers ( CFtpConnection::CreateDirectory) and using CFtpConnection::PutFile you can recursivly put file on remote server!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV
-
I checked many functions to do the same but i could not... i want the help to copy a folder and a file to another folder using a FTP connection... can any one help to do the same...awaiting your reply
hi, i also facing the same problem, how i can connect to the FTP Server and also get the file and save the file in server?? is the connection using CFtpConnection? and where can i get the references...:doh: have a nice day :)
-
hi, i also facing the same problem, how i can connect to the FTP Server and also get the file and save the file in server?? is the connection using CFtpConnection? and where can i get the references...:doh: have a nice day :)
-
Vivek krishna wrote:
. i want the help to copy a folder and a file to another folder using a FTP connection... can any one help to do the same...awaiting your reply
there is no such function exist in Unmanaged VC++. you have to implement the logic urself for same, i.e. you have to create directory on remote servers ( CFtpConnection::CreateDirectory) and using CFtpConnection::PutFile you can recursivly put file on remote server!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV
i tried the same but what happens is the file copies separately in the same place where the new folder created not inside the created folder.
//connection..
pConnect = sess.GetFtpConnection(m_host,
m_user,m_pswd,atoi(m_port),false);// use a file find object to enumerate files
CFtpFileFind finder(pConnect);
pConnect->CreateDirectory("sample");
// start looping
BOOL bWorking = finder.FindFile(_T("*"));
strFileName += m_host;
strFileName += finder.GetRoot();MessageBox(strFileName); BOOL bUploaded = pConnect->PutFile("C:/070206\_NewVExls.xls", "ss",FTP\_TRANSFER\_TYPE\_BINARY,1); if(bUploaded==0) MessageBox("unsucess");
-
i tried the same but what happens is the file copies separately in the same place where the new folder created not inside the created folder.
//connection..
pConnect = sess.GetFtpConnection(m_host,
m_user,m_pswd,atoi(m_port),false);// use a file find object to enumerate files
CFtpFileFind finder(pConnect);
pConnect->CreateDirectory("sample");
// start looping
BOOL bWorking = finder.FindFile(_T("*"));
strFileName += m_host;
strFileName += finder.GetRoot();MessageBox(strFileName); BOOL bUploaded = pConnect->PutFile("C:/070206\_NewVExls.xls", "ss",FTP\_TRANSFER\_TYPE\_BINARY,1); if(bUploaded==0) MessageBox("unsucess");
Vivek krishna wrote:
I tried the same but what happens is the file copies separately in the same place where the new folder created not inside the created folder.
You need to change directory on the remote server, otherwise it won't know you need to put the files in a different place. FTP does not stand for File Transfer (Psychic). Iain,
-
Vivek krishna wrote:
I tried the same but what happens is the file copies separately in the same place where the new folder created not inside the created folder.
You need to change directory on the remote server, otherwise it won't know you need to put the files in a different place. FTP does not stand for File Transfer (Psychic). Iain,
i tried to change directory using "SerCurrentDirectory()". but i m not able to change
-
i tried the same but what happens is the file copies separately in the same place where the new folder created not inside the created folder.
//connection..
pConnect = sess.GetFtpConnection(m_host,
m_user,m_pswd,atoi(m_port),false);// use a file find object to enumerate files
CFtpFileFind finder(pConnect);
pConnect->CreateDirectory("sample");
// start looping
BOOL bWorking = finder.FindFile(_T("*"));
strFileName += m_host;
strFileName += finder.GetRoot();MessageBox(strFileName); BOOL bUploaded = pConnect->PutFile("C:/070206\_NewVExls.xls", "ss",FTP\_TRANSFER\_TYPE\_BINARY,1); if(bUploaded==0) MessageBox("unsucess");
Vivek krishna wrote:
BOOL bUploaded = pConnect->PutFile("C:/070206_NewVExls.xls", "ss",FTP_TRANSFER_TYPE_BINARY,1); if(bUploaded==0) MessageBox("unsucess");
Please give Folder path as argument instead of string "SS"
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV