If you want to use the directory of the bat file that launched the script
then technically it is
the parent of the script.

You will find that path of that in
system/script/parent/path

so If I used the following line in bat file located in at c:/temp

rebol.exe %/d/demo/test.r args.txt

; The results would be....

system/script/parent/path
==%/c/temp/
system/script/path
==%/d/demo/

Hope this helps.

Cheers

Allen K





----- Original Message -----
From: <[EMAIL PROTECTED]>
Newsgroups: list.rebol
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 14, 2000 9:38 AM
Subject: [REBOL] Finding current dir?


>
> I have question about what is considered the "current
> directory"?
>
> Under Windoze95, with rebol.exe in my path.  I can be in any
> directory any place on my machine or Novell network type
> "rebol" to start up Rebol.
>
> I can do 'print what-dir' and get exactly what I expect, say
> N:\C\410 for example, if I was in N:\C\410 when I started Rebol.
>
> But if I run "rebol N:\UTL\trim.r" when I do 'print
> what-dir' no matter where I am, I get N:\UTL\ as the
> "current directory".
>
> The user guide documents the latter behavior in
> http://www.rebol.com/users/fildir.html by saying 'current
> dir comes from system/script/path'.
>
> Thats all well and good, that I know now the script path,
> but how do I find out what the current directory is?  Rebol
> knew it before I started a script.  Is this knowlage lost,
> if not where is it?
>
> I don't see the logic of this "current directory" behavior?
>
> Any thing wrong with having a real "current directory" and
> a "script path" both?
>
>
> To actually get on with my job this is what I did in my
> batch file:
>
> copy N:\UTL\trim.r /y
> start /w rebol -sqw trim.r...
> del trim.r
>
> A dumb solution, but one that works to get the current dir,
> and lets me move on to more important issues of the project.
>
>

Reply via email to