.NET Framework Bookmark and Share   
 index > .NET Base Class Library > Calculate absolute path
 

Calculate absolute path

Hi all!

I have file wich contains a bunch of relative paths to other files, I am looking for a way to calculate the absolute path for these realtive paths with the absolute path of the file itself as a base.

Exampel:
I have this file:
c:\somedirectory\projects\project\MyFile.xml

Wich contains paths like this:
..\otherdirectory\testfil1.txt
..\..\yeatanother\otherfile.txt

The calculation should result in:
c:\somedirctory\projects\otherdirectory\testfil1.txt
c:\somedirctory\yeatanother\otherfile.txt

Is there any direct support for this in the bcl or does anyone know a way to do this?

Regards!
Pelle


Pelle
Daniel Rieck
Daniel Rieck

You can use google to search for other answers

Custom Search

More Threads

• FileStream exception - illegal characters
• Create a user with SeBackupPrivilege right
• FileSystemWatcher does not work with more than one file
• Baking parameters into a method at runtime
• Unable to consume INotifyCollection in VS 2005, class has dissappeared?
• Orphaned Windows Services
• Ending a background thread that is sleeping
• Query Certificate Store
• Thoughts, Opinions, and Experiences of the Enterprise Library under .NET 2.0?
• Get UserName from other processes