Accept user input in windows batch

Now let us see how to accept the input from the user in batch file. Create one batch file with below code.
@echo off
set /P name=Enter your name
echo Your name is %name%

After you execute above code, it will ask you for your name. Once you enter your name and press “enter” key, your name will be displayed back on the screen. Note that /P stands for user input. name is a variable in which your name is stored using “set” command.
Complex problems, Simple Solutions