Passing Variables from WB to DOS.bat File
Keywords: passing parameters DOS batch files
Question:
How do I pass parameters between WinBatch scripts and DOS Batch files?
Answer:
Here's how.
The WinBatch script:
a="Fred"
b="Sally"
c="123.456"
xxx=strcat(a," ",b," ",c)
Runwait("zing.bat",xxx)
or...
RunWait("zing.bat", "%a% %b% %c%")
The DOS Batch file:
REM ZING.BAT
echo First parameter %1
echo Second Parameter %2
echo Third Parameter %3
echo Forth Parameter %4
pause
Article ID: W13919
Filename: Passing Variables from WB to DOS bat.txt