Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Spaces in prompt string with SET /P

724 views
Skip to first unread message

Dutchie

unread,
Jan 22, 2009, 6:01:26 AM1/22/09
to
I'd like to use a prompt string that contains only spaces, but I can't
seem to get it working.

SET /P var=" :" is possible
SET /P var=": " is possible
SET /P var=" " is possible, but still places the cursor at the
beginning of the screen and not 4 spaces ahead.


Basically I want the following screen:
Enter number:
<cursor here>

And not the screen:
Enter number: <cursor here>

Anybody has a clue ?

PROMPT $S didn't seem to help either...

Timo Salmi

unread,
Jan 22, 2009, 6:33:10 AM1/22/09
to
Dutchie <Dut...@Dutchie.com> wrote:
> SET /P var=" " is possible, but still places the cursor at the
> beginning of the screen and not 4 spaces ahead.

> Basically I want the following screen:
> Enter number:
> <cursor here>

Use a non-printing space (Hex FF)

All the best, Timo

--
Prof. Timo Salmi mailto:t...@uwasa.fi ftp & http://garbo.uwasa.fi/
Hpage: http://www.uwasa.fi/laskentatoimi/english/personnel/salmitimo/
Department of Accounting and Finance, University of Vaasa, Finland
Useful CMD script tricks http://www.netikka.net/tsneti/info/tscmd.htm

foxidrive

unread,
Jan 22, 2009, 6:42:14 AM1/22/09
to
On Thu, 22 Jan 2009 12:01:26 +0100, Dutchie <Dut...@Dutchie.com> wrote:

>I'd like to use a prompt string that contains only spaces, but I can't
>seem to get it working.
>
>SET /P var=" :" is possible
>SET /P var=": " is possible
>SET /P var=" " is possible, but still places the cursor at the
>beginning of the screen and not 4 spaces ahead.
>
>
>Basically I want the following screen:
>Enter number:
> <cursor here>

set /p "var= "

Dutchie

unread,
Jan 22, 2009, 6:56:30 AM1/22/09
to
Ah yes, that's it !
Thank you. :-)

Timo Salmi

unread,
Jan 22, 2009, 7:14:06 AM1/22/09
to
foxidrive <got...@woohoo.invalid> wrote:
> On Thu, 22 Jan 2009 12:01:26 +0100, Dutchie <Dut...@Dutchie.com> wrote:
>> SET /P var=" " is possible, but still places the cursor at the
>> beginning of the screen and not 4 spaces ahead.

> set /p "var= "

or
(set /p var= )

0 new messages