CFtpConnection::SetCurrentDirectory()
-
What is this function used for?:-D No seriously, I have been playing around with CFtpConnection, specifically PutFile, and I have found that i need to specify exacly where the file should be placed on the server. I tried to use SetCurrentDirectory but to no avail. The functions returns success but when I just put the file name in PutFile it transfers it to the root. To me SetCurrentDirectory should let me put just the file name(no path) in PutFile. So my question is. Am I doing it wrong and SetCurrentDirectory should work the way I want it to, or am I suck with PutFile with the Path\FileName. Thanks in advance *********************** Tony Fontenot Recreational Solutions tony@recsolutions.com ***********************
-
What is this function used for?:-D No seriously, I have been playing around with CFtpConnection, specifically PutFile, and I have found that i need to specify exacly where the file should be placed on the server. I tried to use SetCurrentDirectory but to no avail. The functions returns success but when I just put the file name in PutFile it transfers it to the root. To me SetCurrentDirectory should let me put just the file name(no path) in PutFile. So my question is. Am I doing it wrong and SetCurrentDirectory should work the way I want it to, or am I suck with PutFile with the Path\FileName. Thanks in advance *********************** Tony Fontenot Recreational Solutions tony@recsolutions.com ***********************
That's definitely strange because I've written a very basic FTP client and it works fine. Cheers, Tom Archer Author, Inside C# A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the affairs of others.
-
What is this function used for?:-D No seriously, I have been playing around with CFtpConnection, specifically PutFile, and I have found that i need to specify exacly where the file should be placed on the server. I tried to use SetCurrentDirectory but to no avail. The functions returns success but when I just put the file name in PutFile it transfers it to the root. To me SetCurrentDirectory should let me put just the file name(no path) in PutFile. So my question is. Am I doing it wrong and SetCurrentDirectory should work the way I want it to, or am I suck with PutFile with the Path\FileName. Thanks in advance *********************** Tony Fontenot Recreational Solutions tony@recsolutions.com ***********************
It worked perfectly for me, you tried using GetCurrentDirectory and then set the path relatively with SetCurrentDirectory ? What was the error that GetLastError() reports ? x = GetLastError(); Better put the variable x on the watch window with the modifier hr like this: x,hr what the error says ? See this on this page for a basic ftp tool using wininet : Some tips Cheers, Joao Vaz Frustrated TCL programmer,good c++ programmer wannabe
-
What is this function used for?:-D No seriously, I have been playing around with CFtpConnection, specifically PutFile, and I have found that i need to specify exacly where the file should be placed on the server. I tried to use SetCurrentDirectory but to no avail. The functions returns success but when I just put the file name in PutFile it transfers it to the root. To me SetCurrentDirectory should let me put just the file name(no path) in PutFile. So my question is. Am I doing it wrong and SetCurrentDirectory should work the way I want it to, or am I suck with PutFile with the Path\FileName. Thanks in advance *********************** Tony Fontenot Recreational Solutions tony@recsolutions.com ***********************
Got it working thanks all :-O *********************** Tony Fontenot Recreational Solutions tony@recsolutions.com ***********************