static void Main(string[] args)
{
ShowFolders();
}
static void ShowFolders(string root = @"C:\", bool showFullpath = false)
{
foreach (string folder in Directory.EnumerateDirectories(root))
{
string output = showFullpath ? folder : Path.GetFileName(folder);
Console.WriteLine(output);
}
}
No comments:
Post a Comment