Function relativepath

Returns the relative path from an root path to the target path

Returns the relative path from an root path to the target path. Both arguments must be strings with absolute paths. The actual path is optional, if omitted the current dir is used instead. In case the volume drive letters don't match, an absolute path will be returned. If a relative path is returned, it always starts with '.\' or '..\'

Credit: Jochen Lenz

Input:

Output: