PDA

View Full Version : Batch File Question



Krisman
03-19-2003, 02:46 AM
I 'm making a batch file to annoy my friend it looks like this


:loop
net send IP Removed "I am so bored"
goto loop

I want to know how to make it only loop so many times though. I would figure to do this I would set a variable and then add one to it evertime and tell it only to loop if the variable is under whatever number. I don't know if you can do that with a batch file or how if you can. Does anyone know.

Nobody2
03-20-2003, 01:34 PM
:loop
net send 555.666.777.888 "Replace this message and IP number"
set c=!%c%
if not %c%==!!!!!!!!!! goto loop
net send 555.666.777.888 "This was the last time."
Set the last line to another amount of !'s to do it more times. Every ! will loop once.
You can remove/change the last net send.

The following one is modified, you'll need a choice.com file from a 9X machine too.
This will wait one second between every message.

:loop
net send 555.666.777.888 "Replace this message and IP number"
set c=!%c%
choice /n /c:@ /t:@,1
if not %c%==!!!!!!!!!! goto loop
net send 555.666.777.888 "This was the last time."