windows - New to batch programming. Help on setting new variables -


i trying perform below. if try setting accname variable letter rather /p facing syntax error. can tell me why cannot use other variable letter please?

@echo off echo -create set /p program= want do?: goto %program%  :create set /b accname= please type in username: echo %accname% > usernames.txt pause 

/p not variable letter, rather switch tells "prompt user enter new value of program variable".

without /p, set program= want do?:, set value of variable program string what want do?:.

and syntax error because there's no /b switch set command.

for full syntax of set command, use set /?.


Comments

Popular posts from this blog

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -