How to create a prompt for user input in a batch file?

  • Thread starter Thread starter Anthony
  • Start date Start date
A

Anthony

In old win9x batch files I could put a ? at the end of the
batch file name it would prompt the user for input ie

test.bat ?

In W2K that doesn't work. So how can I prompt a user for
input in a batch file?
 
SET /P variable=[promptString]


i.e.
set /p WhatPersonEntered=Enter something here please:
echo You entered %WhatPersonEntered%.


Set SET /? for more details

Ray at work
 
Back
Top