using System.IO;
string file = "C:Documentsfile.txt";
Path.GetDirectoryName(file);
string[] folders = System.IO.Directory.GetDirectories(@"C:My Sample Path","*", System.IO.SearchOption.AllDirectories);
var path = Path.Combine(Directory.GetCurrentDirectory(), "fileName.txt");