Windows 2003下的set帮助(set /?):
...
Two new switches have been added to the SET command:
SET /A expression
SET /P variable=[promptString]
...
The /P switch allows you to set the value of a variable to a line of input
entered by the user. Displays the specified promptString before reading
the line of input. The promptString can be empty.
下面是我试用的过程:
C:\Documents and Settings\xxx>set /p xx=Please Input:
Please Input: del c:\.>x.bat
^^^^^^^^
系统自动提示内容
:: 显示xx环境变量的内容:
C:\Documents and Settings\xxx>set xx
xx= del c:\.>x.bat