Path 在红色语言中获得不同的路径

Path 在红色语言中获得不同的路径,path,rebol,red,Path,Rebol,Red,我正试图用红色语言找到不同的路径。如果我将cd刻录到/myfolder,并运行以下命令: /myfolder$ /path/to/red.exe /path/to/myscript.red 如何从脚本中的代码中获取这3条路径 我试过: system/options/path ; Gives path/to/myscript system/script/path ; Gives none call/output "pwd" outstr ; Gives path

我正试图用红色语言找到不同的路径。如果我将cd刻录到
/myfolder
,并运行以下命令:

/myfolder$ /path/to/red.exe /path/to/myscript.red
如何从脚本中的代码中获取这3条路径

我试过:

system/options/path        ; Gives path/to/myscript
system/script/path         ; Gives none
call/output "pwd" outstr   ; Gives path/to/myscript
what-dir                   ; Gives path/to/myscript
我只能找到一条路。如何获取red.exe的路径和当前工作目录的路径(红色语言-非Rebol)

注意:这与我在Rebol(2&3)中关于Rebol的问题有关,这是如何获得这三条路径的:

system/options/boot/路径/to/red.exe
系统/选项/路径/我的文件夹
系统/脚本/路径/路径/to/myscript.red
此时,只有红色的
system/options/boot
与Rebol在此处的功能相匹配。

从GUI控制台:

boot             string!       {C:\ProgramData\Red\gui-console-2017-11-30-4300.exe}
home             none!         none
path             file!         %/C/ProgramData/Red/
script           none!         none
cache            file!         %/C/ProgramData/Red/
system/options/boot   ; Red binary
system/options/path   ; current dir
system/options/cache  ; Red default dir "home"
从cli:

boot             string!       "C:\ProgramData\Red\console-2017-11-30-4430.
home             none!         none
path             file!         %/C/Users/Old%20Man/desktop/
script           none!         none
cache            file!         %/C/ProgramData/Red/
使用GUI控制台:

boot             string!       {C:\ProgramData\Red\gui-console-2017-11-30-4300.exe}
home             none!         none
path             file!         %/C/ProgramData/Red/
script           none!         none
cache            file!         %/C/ProgramData/Red/
system/options/boot   ; Red binary
system/options/path   ; current dir
system/options/cache  ; Red default dir "home"
系统/选项/引导是一个
字符串,因此您必须使用以下代码进行转换:

to-red-file system/options/boot