How to join two file paths in C #?
You should use Path.Combine () , as in the example below:
string basePath = @"c:\temp"; string filePath = "test.txt"; string combinedPath = Path.Combine(basePath, filePath); // produces c:\temp\test.txt
System.IO.Path.Combine () is what you need.
Path.Combine(path1, path2);