4 Replies - 1530 Views - Last Post: 25 April 2012 - 08:11 PM Rate Topic: -----

#1 evry1falls  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 44
  • Joined: 25-April 12

FTP DIR Listing issue .

Posted 25 April 2012 - 09:23 AM

I'm using Inet control with VB6 to connect to FTP server (i.e: ftp://ftp.microsoft.com), i get connected perfectly.
the problem is that i want to list the directories in a listView control, and im not able to get this done, i only able to display the directories in text box using this code :

Textdir.text = trim("")
do 
Data1 = Inet1.GetChunk(1024,icString)
Data = Data + Data1
loop while Len(Data1) <> 0 
text4.text = data


of course i used
Inet1.Execute ,"DIR"

To retrieve the directory list
... any suggestions ?!

Is This A Good Question/Topic? 0
  • +

Replies To: FTP DIR Listing issue .

#2 evry1falls  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 44
  • Joined: 25-April 12

Re: FTP DIR Listing issue .

Posted 25 April 2012 - 11:39 AM

0 Views ... wow
well i got it fixed .
Was This Post Helpful? 0
  • +
  • -

#3 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 574
  • View blog
  • Posts: 2,989
  • Joined: 19-May 09

Re: FTP DIR Listing issue .

Posted 25 April 2012 - 02:38 PM

Glad you got it sorted. We've been working on a guaranteed turnaround time, too, of under one hour. Because hey, we love marching to your baton while we work for free. Wouldn't you?

Sorry we took so long to respond. You have every right to be upset and not explain how you fixed your problem for all the other noobs who might be helped by your explanation. We'll try harder next time. However, please keep in mind that we can respond quicker on evenings, weekends, and holidays when we're not working and can neglect our families to make sure you get helped in time.

This post has been edited by BobRodes: 25 April 2012 - 02:41 PM

Was This Post Helpful? 1
  • +
  • -

#4 evry1falls  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 44
  • Joined: 25-April 12

Re: FTP DIR Listing issue .

Posted 25 April 2012 - 03:18 PM

@BobRodes i'm sorry for such an attitude, i've been searching for days.
Anyway, all i did is : New string Array (Entry()) and stored the Inet1.Chunk in (Text.Text), i used the Entry() to Split the Text.Text (Entry = Split$(Text.Text, VbCrlf, vbTextCompare) , then some loop while Unbound .... Here is the Code :
CMDGet_Die_Click()
Do
DoEvents
Loop Until Not Inet1.StillExecuting
Data1 = Inet1.GetChunk(1024, icString)
Data = Data + Data1
Text.Text = Data
End Sub


Then .... Display into ComboBox (Listed) still working on ListView But this is a way to accomplish what i wanted .
CMD_Prepare_Click()
Entry = Split(Text.Text, vbCrLf, , vbTextCompare)
    XX = 0
 Do While XX < UBound(Entry)
        If Trim$(Entry(XX)) <> "" Then
            List.AddItem Entry(XX)
        End If
        XX = XX + 1
    Loop
    If List.ListCount = 0 Then
        List.ListIndex = -1
    Else
        List.ListIndex = 0
    End If
End Sub



Well, this just for now, i wanted to be able to when i click on the folder name i get it stored in variable to be able to use it to open it ..
Listing in ListView is what i will figure out, and i will share updates, until i finish the FTP Using Inet1 without Api Function Calls.And i will post the whole Source Code when i'm done...
You are a very nice person, BTW
Was This Post Helpful? 1
  • +
  • -

#5 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 574
  • View blog
  • Posts: 2,989
  • Joined: 19-May 09

Re: FTP DIR Listing issue .

Posted 25 April 2012 - 08:11 PM

Ok, I accept your apology on behalf of all the hardworking folks here. :) Thanks for sharing your solution.

This post has been edited by BobRodes: 25 April 2012 - 08:11 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1