I have the following piece of code:
foreach (string file in Directory.GetFiles(sourcePath)) { // whatever }
That gets files from a spec
You have an overload for this which allows you to specify a search pattern or if you need to specify search options there's another overload:
foreach (string directory in Directory.GetDirectories(sourcePath, "di*")) { // whatever }