How to convert a relative path to an absolute path in a Windows application?

Have you tried:

string absolute = Path.GetFullPath(relative);

? Note that that will use the current working directory of the process, not the directory containing the executable. If that doesn’t help, please clarify your question.

Leave a Comment