I’m developing an application that must read an Input file, which contains several file paths, and then open and read each one of them. Let’s suppose that the Input file is in the following path:
C:\temp\Analysis\InputFile\Input.txt
The paths that are in Input.txt are relative, as follows:
.\Config.txt
.\TestFile\Test.txt
..\Materials.txt
..\PropertyFile\Properties.txt
..\..\AnalysisManagement.txt
I would like to know how to pass these relative paths to C# in order to it correctly understand the path. Need I to write a routine to convert these relative paths to absolute paths or there is a method to work with relative paths in C#?