Problem in saving Files and Folders
-
hello everyone, i am trying to save some files and folders onto a FTP server. i can successfully create the tree structure of the files and folders onto an FTP running Windows. but the operation fails when i try to save the same tree structure onto an FTP server running Linux on it. may be the
CFtpConnection:: CreateDirectory()
function works only on the FTP servers running windows Operation System on it, is it??? i am not sure. can anyone please help me. Thanks..vijay.
-
hello everyone, i am trying to save some files and folders onto a FTP server. i can successfully create the tree structure of the files and folders onto an FTP running Windows. but the operation fails when i try to save the same tree structure onto an FTP server running Linux on it. may be the
CFtpConnection:: CreateDirectory()
function works only on the FTP servers running windows Operation System on it, is it??? i am not sure. can anyone please help me. Thanks..vijay.
vijay7173 wrote:
FTP server running Linux on it
There's your problem right there ;) Seriously, though, are you getting an error returned from CreateDirectory()? Are you specifying a correct/appropriate path?
-
vijay7173 wrote:
FTP server running Linux on it
There's your problem right there ;) Seriously, though, are you getting an error returned from CreateDirectory()? Are you specifying a correct/appropriate path?
Mark Salsbery wrote:
are you getting an error returned from CreateDirectory()?
yes sir.the CreateDirectory() returns 0.:( more over it returns with an error code of 12003 :omg: and i am not able to make out what exactly the error is about.
Mark Salsbery wrote:
Are you specifying a correct/appropriate path?
yes, i am giving the correct path. the problem is that, i am sometimes successful in saving the tree to the FTP server with Linux running on it. but the Hierarchy is not preserved. i.e, the entire tree is saved at a same level. eg: a file with path, say,
/root/folder1/folder2
the directoryfolder2
is created and saved underroot
folder, where as it should be saved infolder1
(which is in turn saved underroot
). i have checked the path and i am sure that i am giving the right path. i even made sure to see that the path is not modified in between. can i know what i should do to make my tree save to be saved onto the FTP server with Linux on it??? I am using the member functions ofCFtpConnection
class. should i use any alternatives(if there are any)??:confused:vijay.
-
Mark Salsbery wrote:
are you getting an error returned from CreateDirectory()?
yes sir.the CreateDirectory() returns 0.:( more over it returns with an error code of 12003 :omg: and i am not able to make out what exactly the error is about.
Mark Salsbery wrote:
Are you specifying a correct/appropriate path?
yes, i am giving the correct path. the problem is that, i am sometimes successful in saving the tree to the FTP server with Linux running on it. but the Hierarchy is not preserved. i.e, the entire tree is saved at a same level. eg: a file with path, say,
/root/folder1/folder2
the directoryfolder2
is created and saved underroot
folder, where as it should be saved infolder1
(which is in turn saved underroot
). i have checked the path and i am sure that i am giving the right path. i even made sure to see that the path is not modified in between. can i know what i should do to make my tree save to be saved onto the FTP server with Linux on it??? I am using the member functions ofCFtpConnection
class. should i use any alternatives(if there are any)??:confused:vijay.
vijay7173 wrote:
more over it returns with an error code of 12003 and i am not able to make out what exactly the error is about.
INFO: WinInet Error Codes (12001 through 12156)[^] 12003 ERROR_INTERNET_EXTENDED_ERROR An extended error was returned from the server. This is typically a string or buffer containing a verbose error message. Call InternetGetLastResponseInfo to retrieve the error text. What is the current directory (use CFtpConnection::GetCurrentDirectory()) before you try to create a directory?
-
vijay7173 wrote:
more over it returns with an error code of 12003 and i am not able to make out what exactly the error is about.
INFO: WinInet Error Codes (12001 through 12156)[^] 12003 ERROR_INTERNET_EXTENDED_ERROR An extended error was returned from the server. This is typically a string or buffer containing a verbose error message. Call InternetGetLastResponseInfo to retrieve the error text. What is the current directory (use CFtpConnection::GetCurrentDirectory()) before you try to create a directory?
Mark Salsbery wrote:
What is the current directory (use CFtpConnection::GetCurrentDirectory()) before you try to create a directory?
well sir, the server connected me to the Root Directory (i.e, '/'). and every time i use
CFtpConnection::SetCurrentDirectory()
to set the directory when i am supposed change it.vijay.
-
Mark Salsbery wrote:
What is the current directory (use CFtpConnection::GetCurrentDirectory()) before you try to create a directory?
well sir, the server connected me to the Root Directory (i.e, '/'). and every time i use
CFtpConnection::SetCurrentDirectory()
to set the directory when i am supposed change it.vijay.
Hmmm I don't know. Can you post the code you use? Have you tried InternetGetLastResponseInfo() to see if there's a meaningful error message?