Actually you have to recursively call your function..
Here is my code :
Module BrowseFoldersEx
Sub main()
Dim direc As New DirectoryInfo("C:\abhishek")
If direc.Exists = False Then
MsgBox("The path does not exist. Please specify a correct path")
Exit Sub
End If
Console.WriteLine("Folders are : ")
RepeatDir(direc)
Console.ReadLine()
End Sub
Function RepeatDir(ByVal drr As DirectoryInfo)
Dim fls As DirectoryInfo
For Each fls In drr.GetDirectories()
Console.WriteLine(fls.Name)
RepeatDir(fls)
Console.WriteLine("Checking for Files:")
RepeatFiles(fls)
Next
End Function
Function RepeatFiles(ByVal dirs As DirectoryInfo)
Dim fl As FileInfo
For Each fl In dirs.GetFiles()
Console.WriteLine(fl.Name)
Next
If fl Is Nothing Then
Console.WriteLine("No files are present in this folder " & dirs.Name)
End If
End Function
End Module
Hope this helps! :)