Hello!
Im new to using Batch commands and im wondering how to set a variable When i've executed the batch. For example.. You start the program, and then you get to choose the variable's value or word.
I want to be able to use this as normal, as if i've used ''set var=example'' and %var% = example.
Sorry bout the bad english.
Choosing a variable's value or ''word'' [help]
Moderator: DosItHelp
Re: Choosing a variable's value or ''word'' [help]
I'm not quite certain what you are looking for. Maybe SET /P
Regards
aGerman

Code: Select all
set /p "var=Enter the value: "
echo You entered %var%
Regards
aGerman
Re: Choosing a variable's value or ''word'' [help]
Thank you!
I'd like it to open X instances with a code aswell. Like opening 10 instances with ipconfig as a command. right now im using:
:choice1
START x.bat
START x.bat
START x.bat
START x.bat
START....
I'd like it to be only 1 bat file instead of 2.
Thanks again!
I'd like it to open X instances with a code aswell. Like opening 10 instances with ipconfig as a command. right now im using:
:choice1
START x.bat
START x.bat
START x.bat
START x.bat
START....
I'd like it to be only 1 bat file instead of 2.
Thanks again!

Re: Choosing a variable's value or ''word'' [help]
Tell us exactly what you need - batch files often change quite markedly with small differences in the task.