http://dotnetperls.com/Content/Recursively-Find-Files.aspx Use this method to explore a directory and all of its files. Then, it recurses into the next level of directories, and collects a listing of all the file names you want.
Ejemplo n.º 1
0
 static public void ScriptCounts()
 {
     ScriptCount.Add("ECL", FileSystemUtil.GetAllFileNames((string)Settings.Global.Properties["POLPath"], "*.ecl").Length);
     ScriptCount.Add("SRC", FileSystemUtil.GetAllFileNames((string)Settings.Global.Properties["POLPath"], "*.src").Length);
     ScriptCount.Add("ASP", FileSystemUtil.GetAllFileNames((string)Settings.Global.Properties["POLPath"], "*.asp").Length);
 }