I changed your code a little bit to make it testible for me :
Dim dir1 = "C:\windows"
For Each direct As String In System.IO.Directory.GetDirectories(dir1)
Dim dir As String = System.IO.Path.GetFileNameWithoutExtension(direct)
TreeView1.Nodes.Add(dir, dir)
Dim inx As Integer = TreeView1.Nodes.Count
Try
For Each file As String In System.IO.Directory.GetFiles(direct + "\", "*.*")
TreeView1.Nodes(inx - 1).Nodes.Add(System.IO.Path.GetFileName(file))
Next
Catch ex As Exception
End Try
Next
But I think this you can see what must be changed to your code ...