.Net - Remove dots from the path
string path = Path.GetFullPath("C:\\foo\\..\\bar"); // path = "C:\\bar"
More Info
Have you tried
string path = Path.GetFullPath(@"C:\foo\..\bar");
in C# using the System.IO.Path class?
Use Path.GetFullPath