Windows – Make a line break when requesting user input (/P) in batch


Is it possible to create a line break after a set /P command? I would like the user to be able to type on a new (blank) line instead of next to the existing prompt. For example:

set /P test=type now

echo %test%

This code simply lets the user type next to the prompt.

Best Solution

If you want input on the following line, just use:

echo type now
set /p test=
echo %test%

The echo will output the prompt including the newline, then you just use set /p with no prompt.