1.

Solve : Copy and....?

Answer»

I know how to copy a file and paste it to the same directory where the .cmd or .bat is located.
EXAMPLE:
copy C:\windows\explorer.exe

But how do I make copies of that same file automaticaly ?

EXAMPLE:
Copy of explorer.exe
Copy (2) explorer.exe
Copy (3) explorer.exe

I want the code to automaticaly make copies of the same file in the folder without having to copy the code over and over again in the same .cmd file.
why do you want to do this?
Sounds like he's trying to make a "fork bomb".

Which is basically a .bat that copies/runs itself over and over again tying up all the ram.What is this forum now, a school for the DUMBER sort of script kiddie?


i don't know about you guys, but how does this differ from what OP is asking?
Code: [Select]for a range of numbers using the for loop
copy file file+counter
increment counter
this is a "fork" bomb too right? Imagine the counter is a huge number.....and I believe the actual batch code is posted somewhere....Wasn't that kind of dumb, Fen_Li? Now the script kiddie will cause much damage and TROUBLE, and you showed him how. I hope he fills up your hard drive!
contrex, I tried to PM you but it said you had blocked my message.
Is the advice above actually dangerous?
If so, Fen_Li should remove it.Wasn't that kind of dumb, Contrex? Now the script kiddie will cause much damage and trouble, and he will fills up your hard drive!

hei you, i think you just incriminate people, not give an answer or little suggestion..
are you chicken-hearted ?? (/w that script)
are you think with your level "SPECIALIST" you think better than me "a Rookie", aint always...
Quote from: Calum on September 10, 2007, 11:47:00 AM

contrex, I tried to PM you but it said you had blocked my message.
Is the advice above actually dangerous?
If so, Fen_Li should remove it.

I looked in my PM settings & somehow it was set to ignore all messages! (asterisk in ignore list box). Don't know how that happened.

Well, after I asked why the OP wanted a script to do what he asked, a number of people replied that the OP was asking for a script for a "fork bomb". Well, a fork bomb is actually something different. The fork bomb is a form of denial of service attack against a computer system that implements the fork operation, or equivalent functionality whereby a running process can create another running process.

What the OP asked for was a script which would continue copying a file indefinitely. The script supplied by Fen_Li, if run on a Windows system, would continue until the drive or partition was full. It could be copied, by a person who could not have dreamed it up themselves, onto a floppy or PENDRIVE or CDROM, or emailed into a school or work environment, where it would create havoc if run on machines in that environment by a malicious* person.

* see Fen_Li's reply to me.

So it is in fact a dangerous script.
Fen_Li - please remove the advice you have given as it appears to be dangerous.
If you do not remove the info within the next 10 minutes I will remove it myself.
Thanks.
Edit: thanks for removing the post.Fork bomb? First time I hear of that. I am new to MS-DOS and I was lurking though the help file looking at the "COPY" parameters. Then I wanted to know if there was a way to copy the same file automaticaly. I just wanted to know if it were possible though MS-DOS. I know how to do it in Visual Basic but since MS-DOS seems more simple to me, I just wanted to know how to do it in MS-DOS.

If nobody can help me, it's OK. There are MS-DOS books I can buy that can help me.
Its just that I wanted to take the easy route.
Take Care! What do you mean "copy the same file automatically". Why would you want many copies of the same file in one folder?
Quote from: FORMAT on September 11, 2007, 08:03:08 AM
If nobody can help me, it's OK. There are MS-DOS books I can buy that can help me.
yup, read those books, and then using the pseudocode that i posted as a guide, you will be able to come up with one on your own.A good friend of this forum sent me the code.
It does work but it did not function automatically.
What I had to do was place "Call (and the name of the .CMD or .BAT)"
and woohoo! It started copying automaticaly!

Problem is that after deleting the files. The Hard disk is still missing valuable free space. I don't know why...

Anyway, Thanks guys!


Discussion

No Comment Found