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

E

ergo_largo

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!
 
T

Twayne

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top