I wrote this code on my own and if someone thinks its usefull, fell free to use it.
namespace System.IO
{
public sealed class PathEx
{
public static string GetRelativePath(string sFolder, string sItem)
{
//check whether the files are on the same drive
if (sFolder.ToUpper()[0] !=...
No, that's not what I mean.
Extracting the folder name can be done by using System.IO.Path.GetDirectoryName(mystring);
I want to get the relative path to myFile.txt if I am in the folder C:\Program Files. The relative path is ..\myFile.txt
.. = go up one folder
myFile.txt = the file
Another...
Hello,
I'm searching for a function that returns the relative path of two absolute paths passed as arguments.
E.g. I'd like to get ..\myfile.txt if the absolute paths are
C:\Program Files and
C:\myfile.txt
I'd like to know whether there is a function to merge a relative and an absolute path as...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.