Is there any other way....
-
I have designed the FTP client application using the WinInet classes . In that for storing the file on the FTP server i have used the CFtpConnection: PutFile(), but it is not retuning true and so the local file is not getting stored at the FTP server.The Error it is saying is that dwd =2(i.e ERROR_FILE_NOT_FOUND )Please help me out in this .... Is there any other to store the file on the FTP server... Thanks n Regards Shikha
-
I have designed the FTP client application using the WinInet classes . In that for storing the file on the FTP server i have used the CFtpConnection: PutFile(), but it is not retuning true and so the local file is not getting stored at the FTP server.The Error it is saying is that dwd =2(i.e ERROR_FILE_NOT_FOUND )Please help me out in this .... Is there any other to store the file on the FTP server... Thanks n Regards Shikha
Why don't you work out why it's returning false, and fix it ?
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
Why don't you work out why it's returning false, and fix it ?
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
Thanks for your immediate reply... its showing ERROR_FILE_NOT_FOUND when i try to fix it using the GetLastError() but i cannot able to find out the reason.. why it need to find the file on the ftp server it should just get store the specified local file on the server side.... Thanks Shikha
-
Thanks for your immediate reply... its showing ERROR_FILE_NOT_FOUND when i try to fix it using the GetLastError() but i cannot able to find out the reason.. why it need to find the file on the ftp server it should just get store the specified local file on the server side.... Thanks Shikha
Perhaps it can't find the local file ? Or you don't have permission to create the file, so it's not found when it tries to write to it ?
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
I have designed the FTP client application using the WinInet classes . In that for storing the file on the FTP server i have used the CFtpConnection: PutFile(), but it is not retuning true and so the local file is not getting stored at the FTP server.The Error it is saying is that dwd =2(i.e ERROR_FILE_NOT_FOUND )Please help me out in this .... Is there any other to store the file on the FTP server... Thanks n Regards Shikha
Shikha Jain wrote:
The Error it is saying is that dwd =2(i.e ERROR_FILE_NOT_FOUND )...
Why was the local file not found? Without seeing the relevant code, a helpful answer is going to be a guess at best.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
Shikha Jain wrote:
The Error it is saying is that dwd =2(i.e ERROR_FILE_NOT_FOUND )...
Why was the local file not found? Without seeing the relevant code, a helpful answer is going to be a guess at best.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
HI Shikha!!! Are u passing the correct path of the file to be uploaded in the
CFtpConnection::PutFile()
function??? i am new to programming but i had developed a FTP client just a couple of months back.. so, i want u to see if you are passing the correct path in thePutFile()
function. and like what Sir David Crow said, without having a look at ur code, we may not be able to give u the correct suggestions.. so, just see if u can post the sample of ur code... i used the following lines of code to upload a file called as 'test.txt' residing on my 'C' drive.the file will be stored as 'ftptest.txt' on the FTP server.//Create a session variable and get a pointer to the FTP connection.. CInternetSession sess(_T("MyFtpModule")); CFtpConnection* pConnect = NULL; //use pConnect to Connect to the server pConnect = sess.GetFtpConnection(_T(/*pass the parameters here*/)); //when the connection is established,use PutFile() to upload BOOL bUploaded = pConnect->PutFile("C:\\test.txt","ftptest.txt",FTP_TRANSFER_TYPE_ASCII,1);
I want others to correct if i am wrong..Regards, vijay Aroli.