you could look in to IO.Directory and IO.File , here's an example of getting all directories in the C:\ area and adding to a treeview :
VB Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim directory As IO.Directory Dim strPaths() As String = directory.GetDirectories("C:\") Dim x As Integer For x = LBound(strPaths) To UBound(strPaths) TreeView1.Nodes.Add(strPaths(x)) Next End Sub





Reply With Quote