Hi,
after having some problems with split-path, here is my version:
(Andrew, it may be nice to have it in your %patch.r)
split-path: func [
{
Splits a file or URL. Returns a block containing path and
target.
Overcomes some limitations of the Core split-path like
strange results for:
split-path %file.r
split-path %dir/
split-path to file! ""
Moreover, the identity:
file = (append copy first r: split-path file second r)
is always preserved.
}
file [file! url!]
/local path target
] [
target: path: to string! file
parse path [any [#"/" target: | skip]]
path: copy/part path target
reduce [to file path to file target]
]