In batch, how do I create spaces at the beginning of a input prompt string?

前端 未结 5 1961
一生所求
一生所求 2021-02-13 03:27

Let\'s say I have a batch file that has \"padding\" in it, and I want to indent the beginning of the prompt string for the user to type in. If I use spaces, it will not show up

5条回答
  •  梦谈多话
    2021-02-13 04:04

    This works in every Windows OS from W2K + I've tried, if it suits you. You could just use a : in the string.

    set /p "var=Please input something: "
    echo.%var%
    

提交回复
热议问题