SET /P in batch file - Default value after timeout for user prompt

  • Thread starter Thread starter ergo_largo
  • Start date Start date
E

ergo_largo

Guest
Hello!

This used to be easy with the CHOICE command in Win9x batch files, but I
think I must be missing something, as I can't find out how to do this using
SET /P, the replacement in WIN XP. Does anybody know if and how to get a
batch file to wait a limited time for user input, and to use a default value
instead if the time expires without user input? I thought it might be
possible to do something equivalent to

SET /P:30,Y choice=Enter your choice

I know this is just made up, its just an example of what I was trying to do,
but does anybody know how I would go about doing this sort of thing? I can't
find any relevant documentation anywhere ....

thanks very much!
 
Re: SET /P in batch file - Default value after timeout for user prompt

alt.msdos.batch.nt has many regular users.
 
Re: SET /P in batch file - Default value after timeout for user prompt

> alt.msdos.batch.nt has many regular users.

Yes; excellent reference.
Also, choice is still available for download from many places and will
work perfectly on XP Pro or Home.

Twayne
 
Back
Top