tags:

views:

100

answers:

2

Can't seem to find a way to do this, google is failing me!

Please help, thank you!

+1  A: 

Try this:

Imports System
Imports System.IO

Class Program
    Shared Sub Main()
     For Each Dir As String In Directory.GetDirectories("c:\Program Files")
      Console.WriteLine(Dir)
     Next
    End Sub
End Class

I am using the Directory.GetDirectories method which returns an array of strings, one for each subdirectory of the directory I provide as a parameter to the method.

Andrew Hare
+1  A: 
DirectoryInfo di = new DirectoryInfo("path");

di.GetDirectories();
Josh