Results 1 to 2 of 2

Thread: Directory listing in listbox

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2004
    Location
    Madras
    Posts
    13

    Question Directory listing in listbox

    Could someone please write some code in vb that looks through a drive and its subdirs looking for a specific file type and outputs it into a checked list box?

  2. #2
    PowerPoster
    Join Date
    Sep 2006
    Location
    Egypt
    Posts
    2,579

    Re: Directory listing in listbox

    Code:
            Dim files() As String = IO.Directory.GetFiles("C:\Windows", "*.exe", IO.SearchOption.AllDirectories)
    
            ListBox1.Items.AddRange(files)



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