Oct 14, 2003 #1 L lothos12345 Well-known member Joined May 2, 2002 Messages 294 Location Texas How do I read all the file names in a particuliar folder and display those names in a listbox?
Oct 14, 2003 #2 K Kaprisone Member Joined Oct 14, 2003 Messages 6 Dim d() As String Dim myDir As String myDir = "c:\windows" d = System.IO.Directory.GetFiles(myDir) Dim en As System.Collections.IEnumerator en = d.GetEnumerator While en.MoveNext ListBox1.Items.Add(CStr(en.Current)) End While
Dim d() As String Dim myDir As String myDir = "c:\windows" d = System.IO.Directory.GetFiles(myDir) Dim en As System.Collections.IEnumerator en = d.GetEnumerator While en.MoveNext ListBox1.Items.Add(CStr(en.Current)) End While
Oct 15, 2003 #3 dynamic_sysop Well-known member Joined Oct 1, 2002 Messages 1,039 Location Ashby, Leicestershire. Code: Dim files As String For Each files In IO.Directory.GetFiles("C:\") ListView1.Items.Add(files) Next
Code: Dim files As String For Each files In IO.Directory.GetFiles("C:\") ListView1.Items.Add(files) Next