Вверх ↑
Ответов: 5446
Рейтинг: 323
#1: 2007-11-05 15:55:00 ЛС | профиль | цитата
SET /P variable=[promptString]

Требует Windows 2000/XP. Описание:
http://www.ericphelps.com/batch/userin/index.htm#set писал(а):

SET. This only works on Windows 2000 and newer. But it's about time Microsoft built in a way to get user input! When SET is used with the /P option, it will prompt the user for the value. For example:
set /p userin=Please enter your full name:
That will display the prompt "Please enter your full name: " (without the quotes), then assign whatever the user enters to the variable "userin". If you're sharp, you may notice I have a space at the end of the code line after the colon! That's because the user input occurs immediately after the prompt, so if you don't leave a space, it looks pretty bad.

карма: 1

0