Created
May 11, 2018 03:22
-
-
Save longtth/1b23bf4916644caa92adc5446a53d269 to your computer and use it in GitHub Desktop.
Đọc tất cả file trong tất cả sub-folder.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void DirSearch(string sDir) | |
{ | |
try | |
{ | |
foreach (string d in Directory.GetDirectories(sDir)) | |
{ | |
foreach (string f in Directory.GetFiles(d)) | |
{ | |
Console.WriteLine(f); | |
} | |
DirSearch(d); | |
} | |
} | |
catch (System.Exception excpt) | |
{ | |
Console.WriteLine(excpt.Message); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment