I am having a problem using timeout in a batch file. It seems to go into some sort of loop. When I put the following code in a batch file, it just continuously echos "Hello World" until I Ctrl-C to end.
@echo off
echo Hello World
timeout /T 5
pause
I've tried this on both Window 7 and Windows 10 with the same results. If I enter timeout /T 5 in a command line, it works as expected.
Regards,
Dave
Timeout not working in file-works in command line
Moderator: DosItHelp
Re: Timeout not working in file-works in command line
Hi dtmenges,
I guess you called your batch file "timeout.bat"?
Think a bit about the name
I guess you called your batch file "timeout.bat"?
Think a bit about the name
Re: Timeout not working in file-works in command line
How about that! Renamed to test.bat and everything is just peachy.
Thanks, Jeb.
Dave
Thanks, Jeb.
Dave