string fileDirectory = System.IO.Path.GetDirectoryName(@"C:\aaa\bbb.txt");return file.Substring(3);返回aaa
string file = System.IO.Path.GetDirectoryName("E:\\a\\ab\\abc"); return file.Substring(3)