Results 1 to 5 of 5

Thread: [RESOLVED] dir folder

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2006
    Posts
    977

    Resolved [RESOLVED] dir folder

    Hi
    I have a textbox and a listbox inside a vb6 form.When I enter the path of the folder,I want to read all the filenames(that are inside the folder), add them to the listbox and count them(showing the total number of files in a label control)
    How can I do it?
    thanks

  2. #2
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527

    Re: dir folder

    Use a filelist box

    And set the path based on the textbox

  3. #3
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: dir folder

    place a filelistbox, textbox and a command button on your form and copy this code into your command1_click()
    VB Code:
    1. Private Sub Command1_Click()
    2.     File1.Path = Text1.Text
    3. End Sub
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2006
    Posts
    977

    Re: dir folder

    ok,but how can I display the number of files inside the folder and how can I count them?
    thanks

  5. #5
    Hyperactive Member Datacide's Avatar
    Join Date
    Jun 2005
    Posts
    309

    Re: dir folder

    The filelistbox has the same properties of a list box.

    VB Code:
    1. TotalFiles = FileListBox1.ListCount
    PHP in your FACE!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width