So I have a directory where i want to get for all files in all including subdirs, the path of them relative to the parent directory.
Parent directory: "C:\test"
File1 located in: "C:\test\foo\bar.txt"
For Each foundFile As String In My.Computer.FileSystem.GetFiles(Path)
So you have:
Dim root = "c:\temp\" Dim files = My.Computer.FileSystem.GetFiles(root, FileIO.SearchOption.SearchAllSubDirectories)
Now just take the substring starting at the length of the root directory.
Dim filesWithoutRoot = files.Select(Function(f) f.Substring(root.Length)).ToList