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.

How to Check for Number of Parameters

Keywords:      param0

Question:

I have an executable that I want to always pass a parameter. How do I check to make sure a parameter is passed. When I define param1 and no parameter is passed, I receive an error because param1 is not defined. I want to check for param1 and display an error message.

Answer:

Param0 determines the number of parameters there are. If it's zero, none were passed. For example,
        if param0 == 0 then Message("Number of Parameters", "You have no Parameters")

In the tech support area, there is a sample script showing how to pass an unknown number of parameters.


Article ID:   W13908
Filename:   Param0 Shows How Many Parameters are Passed.txt
File Created: 1999:04:15:16:57:12
Last Updated: 1999:04:15:16:57:12