Click here to Skip to main content
15,881,852 members
Articles / Desktop Programming / MFC
Article

Fast and basic ftp client through GUI

Rate me:
Please Sign up or sign in to vote.
1.30/5 (27 votes)
6 Apr 2005GPL3 66.4K   3.1K   13   22
It doesn't use any MFC class for ftp connection.It works on tcp connection.this is really fast.

 

Download sourcecode 43 KB

Download demo 22 KB

Discription:

The code is Using MFC just for the UI purposes.For all other FTP related communication it is using clean c++ code(NO MFC classes).Thats why it's really fast. The main class for the all FTP related issues is FTP class which takes care of all FTP request and responses.I have just implemented the most common requested and is in process of adding new ftp requests. If you find some request to be added or some error condition to be checked please let me know.

 Sample screenshot

 I am making changes to show the trace in it but was not able to do b'cps of lack of time.Will do it sometime later :-).

Sample screenshot

Warning: there have been problems reported concerning the ftp get with newer attribute. Problems might be due to format of ls -l differing from what is expected by commons-net, for instance due to specificities of langage used by the ftp server in the directory listing. If you encounter such a problem, please send an email including a sample directory listing coming from your ftp server (ls -l on the ftp prompt).

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


Written By
Web Developer
India India
Winners never quits,Quitter never wins.

Comments and Discussions

 
QuestionClient code for SFTP? Pin
Nick Thomas5-Jul-10 3:46
Nick Thomas5-Jul-10 3:46 
AnswerRe: Client code for SFTP? Pin
Nipun5-Jul-10 23:08
Nipun5-Jul-10 23:08 
GeneralGood job Pin
zoz20-Nov-06 11:52
zoz20-Nov-06 11:52 
GeneralWorks for me. Pin
Nick Thomas22-May-06 2:35
Nick Thomas22-May-06 2:35 
GeneralStill Have a bug.... Pin
eluuleo27-Jun-05 20:58
eluuleo27-Jun-05 20:58 
GeneralRe: Still Have a bug.... Pin
Nipun28-Jun-05 23:55
Nipun28-Jun-05 23:55 
GeneralRe: Still Have a bug.... Pin
XaHoiBuon4-Jul-05 0:13
XaHoiBuon4-Jul-05 0:13 
GeneralRe: Still Have a bug.... Pin
Anonymous4-Jul-05 17:34
Anonymous4-Jul-05 17:34 
GeneralRe: Still Have a bug.... Pin
Nipun4-Jul-05 17:43
Nipun4-Jul-05 17:43 
GeneralRe: Still Have a bug.... Pin
XaHoiBuon6-Jul-05 5:06
XaHoiBuon6-Jul-05 5:06 
GeneralRe: Still Have a bug.... Pin
Nipun7-Jul-05 18:14
Nipun7-Jul-05 18:14 
GeneralRe: Still Have a bug.... Pin
Nipun18-Jul-05 23:18
Nipun18-Jul-05 23:18 
GeneralRe: Still Have a bug.... Pin
XaHoiBuon19-Jul-05 21:26
XaHoiBuon19-Jul-05 21:26 
GeneralBug in ftp.cpp Pin
rdaly1177916-May-05 10:44
rdaly1177916-May-05 10:44 
Dear Nipun:

I downloaded and modified your excellent little program but was having some difficulty in consistently seeing the remote list of files. I tracked the problem down in ftp.cpp.

Within the loop where you are retrieving the data from the ftp (from the data.txt file) you enter another loop that checks for spaces and skips over them. Because of this it is possible for the i counter to be incremented past 1023. The fix goes in two places:

if(szBuffer[i]==32)
{
newbuffer[j++]='|';
while(szBuffer[i]==32) {
if(i == 1024) // don't exceed buffer counter
break;

i++;
}
}
if(i == 1024) // don't exceed buffer counter

break;

newbuffer[j++]= szBuffer[i];



This will prevent the count exceeding the buffer size and make the data display correct.

Thanks for an excellent program!


Best Regards,


Bob
GeneralRe: Bug in ftp.cpp Pin
Nipun16-May-05 20:04
Nipun16-May-05 20:04 
GeneralRe: Bug in ftp.cpp Pin
rdaly1177917-May-05 5:49
rdaly1177917-May-05 5:49 
QuestionStill no source code? Pin
Dave195618-Mar-05 10:27
Dave195618-Mar-05 10:27 
GeneralSource Code Pin
Dave19568-Mar-05 1:26
Dave19568-Mar-05 1:26 
GeneralIssue Pin
WillemM2-Mar-05 19:46
WillemM2-Mar-05 19:46 
GeneralRe: Issue Pin
Nipun3-Mar-05 16:55
Nipun3-Mar-05 16:55 
GeneralSource Pin
Shotgun2-Mar-05 12:01
Shotgun2-Mar-05 12:01 
GeneralRe: Source Pin
Nipun2-Mar-05 16:38
Nipun2-Mar-05 16:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.