If I have a string saying \"abc.txt\", is there a quick way to get a substring that is just \"abc\"?
\"abc.txt\"
\"abc\"
I can\'t do an fileName.IndexOf(
fileName.IndexOf(
I used the below, less code
string fileName = "C:\file.docx"; MessageBox.Show(Path.Combine(Path.GetDirectoryName(fileName),Path.GetFileNameWithoutExtension(fileName)));
Output will be
C:\file