Batch Looping Text





Introduction: Batch Looping Text

Hi, this is my instructable on how to create a text loop circuit in command prompt(batch).
If you like, please comment for more cool batch tricks!

Step 1: Step One

What you need:
Computer running windows 95 or later
A brain

Step 2: Let's Get Started

Firstly, create a new text file by going right click, new text file
Change the name-must be the name.bat
Accept the message box
Right click and go edit.
You should see Notepad.exe open up

Step 3: Creating the File

Type the first line:

@echo off
title (can be what you like- this is what the file will be called in the title bar)
The title will look something like this

Step 4: The Looping

Write the next lines:

: a
echo (what you would like to be repeated first)
ping localhost -n (a number, how long it will wait until is shows the next line) >nul
cls (this clears the screen for the next line)
echo (what you want to be repeated after the first line)
ping localhost -n (again a number) >nul
(repeat for as many lines as you want. However, leave out the line that says : a, - that is, don't put it again in the file or it wont work)
When you have all the lines you would like repeated, create this line:
goto a
(now save and exit)

Step 5: Test

Click on the file
The command box should open up
In it will be your First line of text, and it will be called whatever your title was
The text will loop continously, with intervals of how long you set it to.

Step 6: Thanks for Viewing This Instructable

Thank you for viewing this instructable. I hope you liked it and please subscribe/comment if you would like more cool batch tricks!



    • Paper Contest 2018

      Paper Contest 2018
    • Pocket-Sized Contest

      Pocket-Sized Contest
    • Science of Cooking

      Science of Cooking

    We have a be nice policy.
    Please be positive and constructive.




    Try naming this nethack.bat(a console game) and you`ll laugh at the result. @echo off cls title Error :top echo Your operaiting system is not suppored goto top

    OR... Better yet... @echo off cls title Error :top echo FATAL ERROR: echo Your operating system is not supported echo Version: ver GOTO top

    And result (anyways):
    Victim:Hmmm... I`m gonna install Windows. *Installs Windows*
    3 hours later...
    Victim: *yawn* I`m tired. I`m gonna go-*BANG* *snore* *snore* *snore*
    You: *types*
    2 minutes later...
    Victim: I`m gonna run nethack. *types* *gasp* AHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!
    You: *chuckle*
    Victim: AHHHH!!!!! MY GAME!!!!!!!!!!!!!!!
    You: *laughs*
    Victim: *types franticly*
    Computer: *beep* *beep* *beep*
    Victim: *types really franticly*
    Computer: *Opens 1000 error messages* *beep* *beep* *Opens 30 CMDs* *beeeeeeep*
    Victim: *types super frantic*
    EEEEEEEEEEEEEE* *freezes for 10 seconds* *ding* *closes all the mess*
    Victim: *wipes sweat off forehead*
    Computer: *beep* *beep* *beep* *Screen freaks out for a moment*
    Victim: Huh?
    Computer: *zzzt* *beep* *beep* *zzzt* *BEEEEEEEEEEEEEEEEEEEEE
    EEEEEEEEEE* *zzzt* *BSOD comes up*
    Victim: *reaches for power button*
    You: *smirks*
    Computer: *Screen really freaks out* *zzzt* *beep* *BOOM*
    *power outage*
    You and victim: Oh my...
    Computer: *zzzt* *bezzzt* *catchs on fire* *KA-BOOM* *zzzt*

    @echo off cls title Error :top echo FATAL ERROR: echo Your operating system is not supported echo Version: ver echo Required: TAT Batch Subsystem GOTO top

    @echo off
    title Error
    echo FATAL ERROR:
    echo Your operating system is not supported
    echo Version:
    echo Required: TAT Batch Subsystem
    GOTO top
    nice^^, but its crap 0o0

    supported...just to letcha know...

    uhm, im not sure whether PING address -n X works
    better would be
    "PING -w (ms to wait per t) -n t>nul"
    this would give more control

    thank you :) would you explain how i would have more control?

    ping /? (^-^)

    Further Information
    "PING" should be clear
    "-w ABCD" sets the delaytime the ping waits till he gets a PONG. I think MAX is 9999 and min of 1 doesn't work (because you got a little delaytime from one command to the other)
    "-n T" T is the numer how often he waits (for ABCD seconds), only change is that it is not one second anymore ('cause you've set [is that right?] it with "-w ABCD")
    "" should be a IP adress you cant ping (I use, so it waits the whole time of "-w ABCD" impossible is and ("PING.EXE" wont ping it properly)
    ">NUL" sends the output to *nowhere. ">CON" is default (your console, that you see)

    Is that explanation ok?
    (sorry for the bad English, would be nice if somebody correct it)

    *NUL is a Object like LPT, LPT1, LPT2, COM etc. But NUL doesn't do anything with it. The output is deleted right away.