How do I join two file paths in C#?
System.IO.Path.Combine() is what you need.
Path.Combine(path1, path2);
You have to 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