Answers for "get folder from file name c#"

C#
3

get directory of file c#

using System.IO;

string file = "C:Documentsfile.txt";
Path.GetDirectoryName(file);
Posted by: Guest on December-03-2020
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
1

c# get directory name from filename

Path.GetDirectoryName(filename);
Posted by: Guest on June-02-2021

Code answers related to "get folder from file name c#"

C# Answers by Framework

Browse Popular Code Answers by Language