WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Variables and Parameters

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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
File Created: 2000:06:21:10:52:06
Last Updated: 2000:06:21:10:52:06