set /p timeout

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
dani8190
Posts: 7
Joined: 17 Mar 2010 03:15

set /p timeout

#1 Post by dani8190 » 20 May 2010 00:30

i cant remember how to make a set /P text=text: with timeout.

:home
set /P some text=some text

if you not have typed somthing and pressed enter for a time it will go back to home. how to do that?

(hope you understand)

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: set /p timeout

#2 Post by aGerman » 20 May 2010 11:35

SET /P stops your batch file and waits for input. There is no timeout.

Regards
aGerman

1+2=46
Posts: 25
Joined: 23 Mar 2010 14:19

Re: set /p timeout

#3 Post by 1+2=46 » 20 May 2010 11:54

Batch is very limited. You can do it with vbs, but I suggest you learning VB.

jeb
Expert
Posts: 1055
Joined: 30 Aug 2007 08:05
Location: Germany, Bochum

Re: set /p timeout

#4 Post by jeb » 20 May 2010 12:07

The only way with pure batch seems to be the use of two cmd-windows.

You can start a second cmd window and start the set /p input in the second window, so the first one can build it's own "timeout".

jeb

Post Reply