Wow, I never thought that I would ever write anything in DOS. Now that I do this, I know why I never wanted this. The syntax is absurd!
In any case, I need help, please. I would like to ask the user for input, and if an empty string is received, I would like to use the default value, for example:
set name=abraham. set /p input=please enter your name, press enter to use %name%: if not %input%=="" set name=%input% echo your name is %name%
I get an error: "set was unexpected at this time."
You can help?
source share