Exactly the same way as the solution to
vb.net how to copy file from one Directory to another directory by create the folder if that folder is not exists[
^] where you posted this question as a solution
[EDIT - after receiving further information from OP]
This code snippet will list all of the sub-folders of C:\Develop (substitute whichever folder you need for that)
Dim dr As String() = System.IO.Directory.GetDirectories("C:\Develop")
For Each s As String In dr
Debug.Print(s)
Next
[EDIT #2 - How to find/skip folders that contain a particular type of file]
This is essentially my entire test form
Imports System.IO
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim dr As String() = Directory.GetDirectories("d:\Gry\OMSI 2\Vehicles")
Dim filter As String = "*.BUS" 'case CAPS or lower doesn't matter
For Each s As String In dr
Dim di As New DirectoryInfo(s) 'Get information about the sub-folder
Dim fi As FileInfo() = di.GetFiles(filter) 'Look for the files you want consider
If fi.GetUpperBound(0) >= 0 Then
Debug.Print("Found folder " + s + " containing file like " + filter)
End If
Next
End Sub
End Class
NB - If your sub-folders have sub-folders of their own, and you do/don't want to look in those sub-folders for *.bus then you can use
Dim fi As FileInfo() = di.GetFiles(filter, SearchOption.TopDirectoryOnly)
and
Dim fi As FileInfo() = di.GetFiles(filter, SearchOption.AllDirectories)
to specify exactly what you want.