Dos - User Interaction

Card Puncher Data Processing

About

The user interaction is done through:

  • the set command that will prompt a message and set a variable with the value entered by the user.
  • the choice command (List choice)

Syntax

Set

SET /P <var>=[<prompt message>]

Example

Set

SET /P theName=What is your Name ? : 
What is your Name ? : Nico

echo Hello %theName%
Hello Nico





Discover More
Card Puncher Data Processing
Dos - Choice

This interaction command allows users to select one item from a list of choices and returns the index of the selected choice. To get more information, type on a console:



Share this page:
Follow us:
Task Runner