• Wait command?

    Author
    Topic
    #2766500

    What would the command be to have Windows pause for x seconds during startup and display a Wait message during…?

    Chuck Billow

    Viewing 3 reply threads
    Author
    Replies
    • #2766524

      Can’t do that as the process is asynchronous and multi-threaded.

      What are you trying to achieve?

      cheers, Paul

    • #2766547

      I have a message in a batch file that I want to pause long enough to read, but not necessarily bring to a full stop/pause.

      Chuck Billow

    • #2766584

      Chuck:  in the BATch file after the message, you want to insert a command

      ping -n 6 127.0.0.1 > nul

      This will pause for the [number of seconds – 1] that you specify after the “-n” parameter.  “-n 6” means “wait for 5 seconds”.  Change the number to suit!

      BATcher

      Plethora means a lot to me.

      2 users thanked author for this post.
    • #2766631

      This will pause for the [number of seconds – 1] that you specify after the “-n” parameter. “-n 6” means “wait for 5 seconds”. Change the number to suit!

      Tha ping command does not have a “pause # secs” function!

      Ping /? shows the following for the n parameter:

        -n count       Number of echo requests to send.

      And how long it takes to complete -n 6 packets will depend on how fast a particular user’s CPU & NIC card are running and will be different for each PC (i.e. on my particular PC with a 4.9 GHz CPU and a 2.5 GHz NIC card, it only takes 3 secs to send 6 packets to 127.0.0.1).

      The correct command to pause a batch file for a set period is the timeout command that’s been available in all versions of Windows since Vista.

      TIMEOUT [/T] timeout [/NOBREAK]

      Description:
      This utility accepts a timeout parameter to wait for the specified
      time period (in seconds) or until any key is pressed. It also
      accepts a parameter to ignore the key press.

      Parameter List:
      /T timeout Specifies the number of seconds to wait.
      Valid range is -1 to 99999 seconds.

      /NOBREAK Ignore key presses and wait specified time.

      /? Displays this help message.

      NOTE: A timeout value of -1 means to wait indefinitely for a key press.

      Examples:
      TIMEOUT /?
      TIMEOUT /T 10
      TIMEOUT /T 300 /NOBREAK
      TIMEOUT /T -1

    Viewing 3 reply threads
    Reply To: Wait command?

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: