I have string say \"c:\\debug\\ *.txt\" In Debug folder there are severeal .txt files , say test1.txt test2.txt test3.txt .
How can I get from this string c:\\debug\\ *.
I use the following code:
Dim Path As String = "C:\debug"
Dim Dir As New DirectoryInfo(Path)
Dim q = (From x In Dir.GetFiles("*.txt", SearchOption.AllDirectories) Select x.FullName).ToArray
You might need to
Import System.IO
Import System.Linq
Basically your key for the requirement is SearchOption.AllDirectories which iterates through sub directories as well.