Answers for "c# get folder name full path"

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
-2

c# get folder of full ilepath

string fileName = @"test.txt";
    string currentDirectory = Directory.GetCurrentDirectory();
    string[] fullFilePath = Directory.GetFiles(currentDirectory, filename, SearchOption.AllDirectories);
Posted by: Guest on September-08-2020

Code answers related to "c# get folder name full path"

C# Answers by Framework

Browse Popular Code Answers by Language