Add space at the front when using Set /P c=.
Posted: 04 Oct 2019 08:01
Good afternoon everyone,
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.
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
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.