get folders in directory c#
string[] folders = System.IO.Directory.GetDirectories(@"C:My Sample Path","*", System.IO.SearchOption.AllDirectories);
get folders in directory c#
string[] folders = System.IO.Directory.GetDirectories(@"C:My Sample Path","*", System.IO.SearchOption.AllDirectories);
get directory name of path c#
string filename = @"C:/folder1/folder2/file.txt";
string FolderName = new DirectoryInfo(System.IO.Path.GetDirectoryName(filename)).Name;
c# get folder path from file path
Path.GetDirectoryName(filename);
c# get folder of full ilepath
string fileName = @"test.txt";
string currentDirectory = Directory.GetCurrentDirectory();
string[] fullFilePath = Directory.GetFiles(currentDirectory, filename, SearchOption.AllDirectories);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us