How to send 3 variables/arguments from batch script (.bat) to JavaScript

804 Views Asked by At

Can someone help me!?!

So I have half a batch (.bat) half javascript script. From clarion I send 3 arguments

  • 0: name of .bat (the batch script)
  • 1: list of arguments
  • 2: a name (string text)

I want to know how to get my variable in batcsh and transfer it to JavaScript.

CLARION:
    runscr= 'script.bat ' & 'data.tps' & 'myname'
    RUN(runscr,1)

script.bat

@if (@a==@b) @end  

       @echo off
       setlocal enabledelayedexpansion

       echo %~nx0 
       echo %1
       echo %2
       pause

    cscript /nologo /e:Jscript 
    ...

echo %~nx0 prints: script.bat

echo %1 prints: data.tps

echo %2 prints: myname

Thanks in advance

0

There are 0 best solutions below