Do you have example code on how to enumerate files and folders using a glob? I would prefer to only enumerate files that match a glob, but only within the most specific sub folder, that way I am not enumerating everything on say the C: drive.
Something like this would be ideal, as long as it was smart enough to pull out the base directory c:/dir1/dir2/dir3 and only enumerate *.txt files within:
foreach (var file in Glob.EnumerateFiles("c:/dir1/dir2/dir3/**/subdir/*.txt"))
{
}
Do you have example code on how to enumerate files and folders using a glob? I would prefer to only enumerate files that match a glob, but only within the most specific sub folder, that way I am not enumerating everything on say the C: drive.
Something like this would be ideal, as long as it was smart enough to pull out the base directory
c:/dir1/dir2/dir3
and only enumerate*.txt
files within: