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 Multiple Parameters to a .BAT file

Keywords:    parameters BAT

Question:

I'm trying to pass a variable from a WinBatch file (uid = joesmith). I used the:
        RunWait('d:\batch.bat',%uid%)
When running it, I get an error 'Uninitialised variable or undefined function', although the uid of joesmith appears in the RunWait statement when debugging it. Using just uid results in nothing being past to the batch file.

What am I doing wrong? Further to this ...... The variable is past to the batch file ok, but new ? is using the RunWait function I can't pass more than one variable to the batch file, i.e.

	RunWait('d:\netgp.bat', param1 uid)
Param1 is defined via a ParseFile and uid is from uid=param2.

Answer:

	PassThis=strcat(param1," ",uid)
	RunWait('d:\netgp.bat', PassThis)

Article ID:   W13912
Filename:   Passing Multiple Parameters to BAT File.txt
File Created: 1999:04:15:16:57:14
Last Updated: 1999:04:15:16:57:14