DOS Command / Input Variable
Get the input value through a variable and display it on the next line using DOS commands. The %=% command is used to get input from the user in command lines and store it to a variable, we can process the value via that variable.
Syntax :-
Output:-
Get the input value through a variable and display it on the next line using DOS commands. The %=% command is used to get input from the user in command lines and store it to a variable, we can process the value via that variable.
Syntax :-
SET /P Variable=Enter the time to Connect: %=%
Example Code:-
echo off
cls
set /P Val1=Enter the time to Connect: %=%
echo Your input was: %Val1%
pause
cls
set /P Val1=Enter the time to Connect: %=%
echo Your input was: %Val1%
pause
Output:-
0 comments:
Post a Comment