On 8/23/22 10:39, Jim Lewis wrote:
Issue:
Some of EDA tools crash when there is a space in the path. However, they are ok with relative paths.
So while "file normalize" would be nice but if there is a space in the parent path, then it is a nonstarter. One thing that need to be able to do is compare two relative paths, such as ./flintstone/fred/../pebbles and flintstone/pebbles, and determine
they are equivalent.
Feature:
file relative <path1> [<path2>] - return a path to <path1> as the shortest relative path to <path2>. If <path2> is not specified, then return a path to <path1> as the shortest relative path to [pwd].
Maybe this exists somewhere and I just did not find it?
From TclLib I think you want: ::fileutil::relative base dst
See:
https://core.tcl-lang.org/tcllib/doc/trunk/embedded/md/tcllib/files/modules/fileutil/fileutil.md#27
--
+----------------------------------------------------------------------+
| Gerald W. Lester, President, KNG Consulting LLC |
| Email:
[email protected] | +----------------------------------------------------------------------+
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)