Makes a path relative to another path.
NewPath = SRP_Path("MakeRelative", PathFrom, PathTo) |
Parameter | Description |
---|---|
PathFrom | A path without command line parameters. |
PathTo | A path without command line parameters. |
The first path reformatted to be relative to the second path.
The MakeRelative service reformats the path passed into PathFrom to make it relative to the path passed into PathTo. This can return an absolute path if the second path has a different root. IMPORTANT: If you do not use a backslash at the end of your first path, then the last component will be treated as a file.
Result1 = SRP_Path("MakeRelative", "C:\Windows\", "C:\Windows\System32\") Result2 = SRP_Path("MakeRelative", "C:\Windows", "C:\Windows\System32") |
Result1 will be ".\System32\". Result2 will be ".\Windows\System32".