Merge directory names

G

Guest

How can I merge two directory names? First path is always absolute and second is relative.
For example:

1) c:\MyTest\Privat
2) ..\Share

And I need result: c:\MyTest\Share
 
J

Jochen Kalmbach

=?Utf-8?B?SmFu?= said:
How can I merge two directory names? First path is always absolute
and second is relative. For example:

1) c:\MyTest\Private
2) ..\Shared

And I need result: c:\MyTest\Shared

string par1 = @"c:\MyTest\Private";
string par2 = @"..\Shared";
string res =
System.IO.Path.GetFullPath(System.IO.Path.Combine(par1, par2));



--
Greetings
Jochen

Do you need a memory-leak finder ?
http://www.codeproject.com/tools/leakfinder.asp

Do you need daily reports from your server ?
http://sourceforge.net/projects/srvreport/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top