Choice Topics | Previous | Next

Choice Examples: Using the /t Switch

Using the following syntax in a batch program:

choice /c:ync /t:n,5

means the user sees the following when Choice is started:

[Y,N,C]?

If the user doesn't press a key within five seconds, Choice selects N and returns an ERRORLEVEL value of 2. Otherwise, Choice returns the value corresponding to the user's choice.