Can't seem to find a way to do this, google is failing me!
Please help, thank you!
Can't seem to find a way to do this, google is failing me!
Please help, thank you!
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.