Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'make a reference to a directory
Dim dir As New System.IO.DirectoryInfo("c:\")
Dim dir1 As System.IO.FileInfo() = dir.GetFiles()
Dim directory As System.IO.FileInfo
'list the names of all files in the specified directory or Drive
For Each directory In dir1
ListBox1.Items.Add(directory)
Next
End Sub