Page 1 of 1

Add space at the front when using Set /P c=.

Posted: 04 Oct 2019 08:01
by PAB
Good afternoon everyone,

Code: Select all

Set c=""
Set /P c=Press [Y] ^&^ [Enter] to REBOOT NOW or [ANY key] to CONTINUE.
    If /I "%c%" EQU "Y" Goto :REBOOT
How can I adapt the code above to put a space at the front of the Press [Y] ^&^ [Enter] to REBOOT NOW or [ANY key] to CONTINUE. so it shows as a space in front in the cmd prompt please?

I used the Set c="" because I understand that it ignores the previous keystroke, or am I wrong?

I have tried several ways, including using "" etc!

Thanks in advance.

Re: Add space at the front when using Set /P c=.

Posted: 04 Oct 2019 09:31
by Squashman