programming wait, in batch files

Sharky Forums


Results 1 to 8 of 8

Thread: programming wait, in batch files

Threaded View

  1. #3
    Hammerhead Shark
    Join Date
    Mar 2001
    Location
    Littleton, CO
    Posts
    2,704
    There ought to be a sleep command of some sort, but then again, windows scripting isn't my thing.

    This machine has sleep on it, but I think it's a cygwin thing. If you don't want to install anything additional and this is really just a temporary quick-fix type of situation, you can always loop the batch file and do something pointless to keep it busy for a few seconds.

    This is all kinds of hackish and pretty stupid, but it slows this machine down for about 5 seconds:

    Code:
    @ECHO OFF
    for %%i in (1,2,3,4,5,6,7,8,9,0,a,b,c,d,e,f) 
      do for %%j in (1,2,3,4,5,6,7,8,9,0,a,b,c,d,e,f)
      do echo . > blah
    Have fun and good luck.

    Oh, and another avenue is to use windows scripting host. I'm positive it's powerful enough to stop and start services and has to have some sort of sleep function.

    EDIT: The indented pieces should be on the same line, but it caused vB to wrap nasty-like.
    Last edited by Nick_B; 03-01-2005 at 11:44 PM.
    Nick_B
    Currently running Ubuntu and Windows 7.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •