I have a directory structure to sift through and I need to be able to specify the top-level folder, a typical example would be:
c:\folder1\1\targetfolder
c:\folder1\2\targetfolder
c:\folder1\3\targetfolder
c:\folder1\4\targetfolder
I want to obtain each file in the folder called targetfolder, specifying this seems to fail:
Directory.GetFiles("c:\folder1\*\targetfolder");
Is there a quick and easy way of achieving this?
Tried with this and works, but you could get false positives if there are file or folders inside your root path with the same pattern