473,378 Members | 1,394 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

How to search the files in the directory with CFTPFileFind.filefind?

Friends,
I am not able to search the files in the directory as the CFTPFileFind.filefind is returning 0 please correct in OnDblclkList1() function
Expand|Select|Wrap|Line Numbers
  1. void CFtp_sample1Dlg::OnOK() 
  2. {
  3.  
  4.     CString str1;
  5.  
  6.  
  7.     try
  8.     {
  9.  
  10.  
  11.         ctp1->GetCurrentDirectory(str1);
  12.  
  13.         ctp1->SetCurrentDirectory("pub/software");
  14.  
  15.  
  16.     //    ctp1->PutFile("draw.exe","draw1.exe");
  17.     //    WaitForSingleObject(ctp1,INFINITE);
  18.  
  19.     //    ctp1->GetFile("freenet_navigatorBB8100.zip","mm1.zip",TRUE);
  20.     //    WaitForSingleObject(ctp1,INFINITE);
  21.  
  22.     //    ctp1->SetCurrentDirectory("software");      
  23.  
  24.  
  25.         CFtpFileFind find(ctp1);       
  26.         BOOL bloop = find.FindFile("*");
  27.  
  28.  
  29.         while (bloop)
  30.         {
  31.             bloop = find.FindNextFile();
  32.  
  33.             m_list1.AddString(find.GetFileName());
  34.  
  35.             UpdateData(FALSE);
  36.             m_list1.SetFocus();                
  37.         }
  38.  
  39.  
  40.     }
  41.     catch(CInternetException e)
  42.     {
  43.         AfxMessageBox("Unable to establish the connection");
  44.     }
  45.  
  46.  
  47.  
  48. }
  49.  
  50. void CFtp_sample1Dlg::OnDblclkList1() 
  51. {    
  52.     CString str3;
  53.     m_list1.GetText(m_list1.GetCurSel(),str3);
  54.     //ctp1->GetFile(str3,"man1.zip");
  55.     ctp1->SetCurrentDirectory(str3);
  56.     CFtpFileFind file2(ctp1);
  57.     BOOL loop = file2.FindFile("*");
  58.     while(loop)
  59.     {
  60.     }
  61.  
Dec 8 '10 #1
0 1387

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Marlon | last post by:
<! -- Web.config--> <authentication mode="Windows" /> <identity impersonate="true" /> <! -- Web.config--> where Configurations.ADsUsersPath is...
3
by: Razvan | last post by:
Hi! What is wrong with the following code ? // Test1.cpp : Defines the entry point for the console application. //
2
by: Barry Hynes | last post by:
Hi Folks, still on the linked list problem... how hazardous is the following code...i realize i do not have copy/assignment defined and there is no exception handling...but was wondering...
1
by: Andrew K | last post by:
Hi, This is a problem I noticed in one of my applications the other day and can't figure out how to fix. In the attached code I have 2 forms. The form named form1 is the MDI container, form2...
3
by: Jack | last post by:
Hi, I have the following code which addes a publisher to the publishers table in the pubs database. However, for some reason, I am getting the following error: Error Type: Microsoft VBScript...
4
by: -D- | last post by:
I'm new to .net and just learning c#. I have the following code in vb and want to convert this to c# Public Class PositionData Private strText As String Private strUrl As String Public...
15
by: kenneth | last post by:
I was trying to use multiple thread to optimize my following code, but met some problems, anyone can help me? k are initialized. int computePot() { int i, j; for( i=0; i<500; i++ ) { for(...
21
by: BASSPU03 | last post by:
(Using Access 2003 on Windows XP.) I'm using the following code from http://www.databasedev.co.uk/image-form.html to display an image using an image control in my main form (frmVetted). This code...
6
by: CSharper | last post by:
I have following code, if you cut and paste it in VS and compile it you see only an answer of 0. I was expecting values from o through 2999 using System; using System.Collections.Generic;...
3
by: vrsathyan | last post by:
Hi.., While executing the following code in purifier.., std::vector<int> vecX; vecX.clear(); int iCount = 0; { int iVal;
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.