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
Keyboard
Mouse
Notepad.exe
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
cls
(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!

Comments

author
will421 (author)2009-04-22

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

author
will421 (author)will4212009-04-22

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

author
will421 (author)will4212009-06-15

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*
Computer: *BEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
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
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
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*

author
BatchMan (author)will4212009-06-28

@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

author
TATcreator (author)BatchMan2009-12-27

...


?

author
Dark-player (author)TATcreator2011-12-15

@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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nice^^, but its crap 0o0

author
fwjs28 (author)will4212009-06-10

supported...just to letcha know...

author
Dark-player (author)2011-12-06

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

author
updown789 (author)Dark-player2011-12-14

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

author
Dark-player (author)updown7892011-12-15

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")
"1.1.1.1" should be a IP adress you cant ping (I use 1.1.1.1), so it waits the whole time of "-w ABCD" impossible is 0.0.0.0 and 255.255.255.255 ("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.

author
Arbitror (author)2009-03-22

Script kiddie..

author
fwjs28 (author)Arbitror2009-05-06

agreed..this stuff gets repetitive...

author
will421 (author)fwjs282009-05-11

VeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVery repetitive!

author
fwjs28 (author)will4212009-05-12

no, more like Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very

author
updown789 (author)fwjs282009-05-23

yh i no lol but i was workin on a virus that can't be closed and always repeats itself but i got stuck on the can't b closed bit ne ideas?

author
fwjs28 (author)updown7892009-05-23

uhh you mean like a forkbomb without the bomb? @echo off color 0a echo killing your computer :haha start %0 goto haha

author
dla888 (author)fwjs282009-06-09

Simpler fork Bomb :a start %0 %0|%0 goto :a I have tried crashing my windows 3.1 laptop but it just keeps going. I had it sitting there for 45 min running this fork bomb. It didn't crash. Although you can put a fork bomb on a floppy disk and load the fork bomb from the disk and after about 5 min of the fork running off the disk remove the disk and the (at least mine did) computer will require a forced reboot.

author
fwjs28 (author)dla8882009-06-09

just use a more resource heavy program and it'll kill the computer in seconds...

author
dla888 (author)fwjs282009-06-10

By resource heavy you mean forks faster? Or uses a bigger file? Or something else?

author
fwjs28 (author)dla8882009-06-10

both...make it evvvvil

author
dla888 (author)fwjs282009-06-10

How could you make it fork faster?

author
fwjs28 (author)dla8882009-06-10

idk...maybe add more of the start %0 like: :a start %0 start %0 start %0 start %0 goto a

author
dla888 (author)fwjs282009-06-11

Maybe :A start %0 start %0 start %0 start %0 start %0 %0|%0 %0|%0 %0|%0 %0|%0 %0|%0 goto A

author
wizerd 745 (author)dla8882009-08-04

I did somthing like this once:


set num=1
set new=%num%%0
:start
copy "%0" "%new%"
start %0
start %new%
set /a num=%num%+1
goto start

author
Arbitror (author)dla8882009-06-11

No, %0|%0 just pretty much causes numerous bugs and errors in the program, slowing it down.

author
fwjs28 (author)Arbitror2009-06-11

taking a sledge hammer to it is even faster...hammer FTW

author
Arbitror (author)fwjs282009-06-10
%0:astart %0goto a
Is faster than that.
author
BatchMan (author)Arbitror2009-06-28

Well, Rocket Propelled Grenade launchers work pretty well..........

author
fwjs28 (author)BatchMan2009-06-28

meh....to much room for error (missfire, resiliant pc, or a miss all together)....i prefer binary explosives...

author
dla888 (author)Arbitror2009-06-11

Would it be faster because it has fewer functions to perform? Also could you change the %0 to something like %9?

author
Arbitror (author)dla8882009-06-11

%0 is the path to the batch file itself. If it was located in the c: drive and saved as "hdf.bat", %0 would mean the same as "C:\hdf.bat". %1-%9 are all different. Check out this.

author
fwjs28 (author)Arbitror2009-06-10

w/e...

author
Arbitror (author)dla8882009-06-10

Buy a faster computer.

author
dla888 (author)Arbitror2009-06-11

That would only make it more resistant to the fork bomb.

author
fwjs28 (author)Arbitror2009-06-10

in theory yes...as for actual practice, maybe not as more resources mean more time to fill the ram and overload the proseccor...

author
fwjs28 (author)fwjs282009-05-23

nvm, the cant be closed bit....i would try shadow ops instructables on start a batch file on code for starting a script fullscreen, as most people freak out when they can't see the X and therefore assume their computers broken

author
Arbitror (author)updown7892009-05-23

I don't help people who make viruses...

author
will421 (author)fwjs282009-05-27

Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Repetitive!!

author
PKM (author)will4212009-06-11
@echo offecho Very:aecho verygoto aecho repetitive!

Beat that :P
author
will421 (author)PKM2009-06-15
Um...

@echo offtitle SUPER-DUPER:POOPERecho LOOPERecho COOPERecho FUPERecho KUPERecho NOOPERecho OOPERecho TUPERgoto POOPERecho Repetitive!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Haha!
author
fwjs28 (author)will4212009-05-27

its getting repetitive....

author
erikals (author)2009-07-17

@echo off title Win32.RESeat.S REM RESeat.S means this program eats memory. echo Your computer will crash soon. :endlesstorture start %0 start %0 start %0 start %0 start %0 start %0 start %0 start %0 start %0 start %0 start %0 goto endlesstorture

author
stormer1127 (author)2009-06-06

sry most prople dont have that last one

author
updown789 (author)stormer11272009-06-07

I no , people think that it is funny to say this is very very very etc repetitive

author
will421 (author)2009-05-06

Ha! You think that`s looping text! NO way, howza!

author
will421 (author)will4212009-05-27
@echo offtitle Looping text:loopecho This is REAL looping textgoto loop

About This Instructable

5,939views

4favorites

More by updown789:Batch looping text
Add instructable to: