Display directories on your drive recursively
Imports System
Imports System.IO
Public Class MainClass
Shared Sub Main()
Dim dirInfo As New DirectoryInfo("C:\")
ListDirectories(dirInfo)
End Sub
Shared Sub ListDirectories(ByVal theDirectory As DirectoryInfo)
Dim tempDir As DirectoryInfo
Console.WriteLine(theDirectory.FullName())
For Each tempDir In theDirectory.GetDirectories()
ListDirectories(tempDir)
Next
End Sub
End Class
Related examples in the same category