Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

get directory name of path c#

string filename = @"C:/folder1/folder2/file.txt";
string FolderName = new DirectoryInfo(System.IO.Path.GetDirectoryName(filename)).Name;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #directory #path
ADD COMMENT
Topic
Name
2+2 =