Answers for "how to get all folders name from path c#"

C#
2

get directory name of path c#

string filename = @"C:/folder1/folder2/file.txt";
string FolderName = new DirectoryInfo(System.IO.Path.GetDirectoryName(filename)).Name;
Posted by: Guest on January-01-2021
0

get folders in directory c#

string[] folders = System.IO.Directory.GetDirectories(@"C:\My Sample Path\","*", System.IO.SearchOption.AllDirectories);
Posted by: Guest on October-30-2020

Code answers related to "how to get all folders name from path c#"

C# Answers by Framework

Browse Popular Code Answers by Language