Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 169111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:34:21+00:00 2026-05-11T12:34:21+00:00

I am trying to write a batch script and trying to wait 10 seconds

  • 0

I am trying to write a batch script and trying to wait 10 seconds between 2 function calls. The command:

sleep 10 

Does not make the batch file wait for 10 seconds.

I am running Windows XP.

Note: This is not a complete duplicate of Sleeping in a batch file as the other question is about also about python, while this is about windows batch files.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T12:34:21+00:00Added an answer on May 11, 2026 at 12:34 pm

    You can ping an address that doesn’t exist and specify the desired timeout:

    ping 192.0.2.2 -n 1 -w 10000 > nul 

    And since the address does not exist, it’ll wait 10,000 ms (10 seconds) and return.

    • The -w 10000 part specifies the desired timeout in milliseconds.
    • The -n 1 part tells ping that it should only try once (normally it’d try 4 times).
    • The > nul part is appended so the ping command doesn’t output anything to screen.

    You can easily make a sleep command yourself by creating a sleep.bat somewhere in your PATH and using the above technique:

    rem SLEEP.BAT - sleeps by the supplied number of seconds  @ping 192.0.2.2 -n 1 -w %1000 > nul 

    NOTE (September 2020): The 192.0.2.x address is reserved as per RFC 3330 so it definitely will not exist in the real world. Quoting from the spec:

    192.0.2.0/24 – This block is assigned as "TEST-NET" for use in documentation and example code. It is often used in conjunction with domain names example.com or example.net in vendor and protocol documentation. Addresses within this block should not appear on the public Internet.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 205k
  • Answers 205k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The best way is to use two really handy plone… May 12, 2026 at 8:55 pm
  • Editorial Team
    Editorial Team added an answer If your labels are added a to a container (… May 12, 2026 at 8:55 pm
  • Editorial Team
    Editorial Team added an answer You can actually do the whole thing with just regular… May 12, 2026 at 8:55 pm

Related Questions

I would like to write simple scripts in C#. Stuff I would normally use
I am a mercurial user on windows and I am trying to write a
I am trying to write a 2D Bone system in XNA. My initial thought
I need to run a task every 10 mins from morning 9 AM to

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.