Posted By

simoncoder on 06/12/18


list files directory showfiles

Versions (?)

show/list all the files in a directory

 / Published in: VB.NET

List all the files in a directory

  1. Dim file() As String
  2. file = System.IO.Directory.GetFiles("c:\")
  3. Dim enumerator As System.Collections.IEnumerator
  4. enumerator = file.GetEnumerator
  5. While enumerator.MoveNext
  6. ListBox1.Items.Add(CStr(enumerator.Current))
  7. End While

Report this snippet  

You need to login to post a comment.