Hi again,

in order to check the specific case of using a batch file I ran the 
following rebol script:

rebol []
dir: "c:\program files\*.*"
cmd: join "dir.bat /s " [{"} dir {"}]
print cmd
call cmd
input

Which in turn runs the bat file called dir.bat (in same directory as rebol 
script).

echo Parm1=%1
echo Parm2=%2
pause

The results displayed by dir.bat are:

D:\src\rebol>echo Parm1=/s
Parm1=/s
D:\src\rebol>echo Parm2="c:\program files\*.*"
Parm2="c:\program files\*.*"
D:\src\rebol>pause
Druk op een toets om door te gaan. . .

So, I assume all works just fine!

Regards
   Arie

----- Original Message ----- 
From: "Ron Bywater" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 20, 2006 1:07 PM
Subject: [REBOL] Using call with quotes


> Hello,
>
> I am wanting to use rebol/view to invoke a .bat file (in windows) which 
> will subsequently run a java program but that is by the by and need to 
> pass parms to the bat file. These parms can contain spaces so I need to 
> surround the parm with quotes (").
>
> My problem is that I can't see how to do this.
>
> Given a .bat file that merely echoes the parms and then holds the DOS 
> command window open for 20 seconds (using ping) then this fragment works 
> fine:
> a: "parm1"
> b: "parm2"
> call reduce [%/c/ron/test1 a b]
>
> and the DOS window opens and displays a = parm1 b = parm2 as I expect.
>
> However when I change this to:
> a:  join {"} ["parm1" {"}]
> b: "parm2"
> in an attempt to put quotes round the parm then the DOS window is not 
> displayed (or at least it may open and close immediately).
>
> Issuing print a however shows "parm1" which shows that the quoting worked.
>
> Can anyone please explain what I am doing wrong.
>
> Sorry if this seems basic but I'm just experimenting with Rebol.
>
> Thanks
> Ron
>
> -- 
> To unsubscribe from the list, just send an email to
> lists at rebol.com with unsubscribe as the subject.
>
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.385 / Virus Database: 268.4.4/319 - Release Date: 19-4-2006
> 

-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to