Batch Script – Input / Output
We are going to learn how to take input from users using Batch Script.
Taking User Input:
@echo off echo Batch Script to take input. set /p input= Type any input echo Input is: %input% pause
Explanation:
- The first ‘echo’ command is used to print a string.
- In the next line, ‘set /p’ command is used to take user input followed by a variable that will hold user input.
