1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Batch File Loop

Discussion in 'DOS/Other' started by Biddlesby, Sep 9, 2003.

Thread Status:
Not open for further replies.
Advertisement
  1. Biddlesby

    Biddlesby Thread Starter

    Joined:
    Sep 3, 2003
    Messages:
    149
    How can you program a loop in a batch file?

    eg. execute this command 53 times with minimal code:

    Code:
    net send 192.168.0.3 Monkey.
    
     
  2. Jelley

    Jelley

    Joined:
    Aug 31, 2003
    Messages:
    167
    @echo off
    :loop
    cls
    *ENTER **** HERE*
    goto loop
     
  3. Biddlesby

    Biddlesby Thread Starter

    Joined:
    Sep 3, 2003
    Messages:
    149
    ? Could you give me the exact code to repeat

    Code:
    net send 192.168.03 Monkey
    
    that 53 times?
     
  4. Whitestar

    Whitestar

    Joined:
    Mar 22, 2003
    Messages:
    511
    I believe it would be

    @echo off
    :loop
    cls
    net send 192.168.0.3 Monkey
    goto loop
     
  5. Biddlesby

    Biddlesby Thread Starter

    Joined:
    Sep 3, 2003
    Messages:
    149
    Right...but that repeats the code unlimited times. Is there a way to minimize the amount of times it repeats:

    net send 192.168.0.3 Monkey

    to a number, such as 53.

    And what does it all mean? What is echo and why does it have to be off?
     
  6. kiwiguy

    kiwiguy

    Joined:
    Aug 17, 2003
    Messages:
    17,584
  7. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Similar Threads - Batch File Loop
  1. niedernsill
    Replies:
    3
    Views:
    426
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/163409

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice