What does /p
stand for in set /p=
? I know that /
enables a switch, and I'm fairly sure that I know /a
is for arithmetic
. I've heard numerous rumours, some saying /p
is for prompt
, others stating it stands for print
. The only reason I slightly doubt it is prompt
is because in many cases it does not ask for a prompt, yet prints on the screen, such as
<nul set /p=This will not generate a new line
But what I want to know is: Do we really know what it stands for?
For future reference, you can get help for any command by using the /?
switch, which should explain what switches do what.
According to the set /?
screen, the format for set /p
is SET /P variable=[promptString]
which would indicate that the p in /p
is "prompt." It just prints in your example because <nul
passes in a nul character which immediately ends the prompt so it just acts like it's printing. It's still technically prompting for input, it's just immediately receiving it.