[Solved] Get Difference of 2 Paths [duplicate]
If Path actually contains double slashes (which usually doesn’t happen): Replace \\ with \ in path1 Replace path1 with Empty String in path2 string diff = path2.Replace(path1.Replace(@”\\”, @”\”), “”); Otherwise: string diff = path2.Replace(path1, “”); 9 solved Get Difference of 2 Paths [duplicate]