I have a file location of the form FileName = "C:\Data\PronetContent\Content\Versions\14602\Working\1234.htm"
I require the part of the string except the htm file name - 1234.htm
So my desired result is "C:\Data\PronetContent\Content\Versions\14602\Working"
I implemented this code snippet:
string[] fileLocation = FileName.Split('/');
string[] fileLocation1 = fileLocation.Take(fileLocation.Count() - 1).ToArray();
string Floc = string.Join("/", fileLocation1);
But I am getting an empty string. Please help