Stuart McLachlan
stuart at lexacorp.com.pg
Thu Feb 26 20:36:46 CST 2004
On 27 Feb 2004 at 13:00, Darren DICK wrote: > Hello all > WAY OT but... > I need a batch file to pause for 'n' seconds > Of course the 'pause' command stops a batch file until a key is pressed, > but is there something like "pause, 3" where 3 is the delay to pause, in seconds > > Sorry for the OT post > > If anyone is able to reply can they do it OFF LIST please to d.dick at uws.edu.au > Not completely OT, so I'm replying on list since it's also a useful technique within a VBA Shell command. You can do it using CHOICE: CHOICE /T:N,3 >Null will wait for 3 seconds and then continue. It actually puts up a Y/N prompt and waits 3 seconds before defaulting to N. But since you are sending the output to Null - nothing appears to happen for the 3 seconds. You can create a batchfile containing one line File - WAIT.BAT @CHOICE /T:n,%1% > Null Then to wait for 5 seconds, just use WAIT 5 or CALL WAIT 5 -- Stuart McLachlan Lexacorp Ltd Application Development, IT Consultancy http://www.lexacorp.com.pg