Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Copy and....  (Read 3109 times)

0 Members and 1 Guest are viewing this topic.

FORMAT

  • Guest
Copy and....
« on: September 09, 2007, 08:40:58 AM »
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.

contrex

  • Guest
Re: Copy and....
« Reply #1 on: September 09, 2007, 01:24:37 PM »
why do you want to do this?

Kirbya

  • Guest
Re: Copy and....
« Reply #2 on: September 09, 2007, 01:38:37 PM »
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.

contrex

  • Guest
Re: Copy and....
« Reply #3 on: September 09, 2007, 01:43:12 PM »
What is this forum now, a school for the dumber sort of script kiddie?



ghostdog74



    Specialist

    Thanked: 27
    Re: Copy and....
    « Reply #4 on: September 09, 2007, 09:04:29 PM »
    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....

    contrex

    • Guest
    Re: Copy and....
    « Reply #5 on: September 10, 2007, 11:41:45 AM »
    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!

    Calum

    • Moderator


    • Egghead

      Thanked: 238
      • Yes
      • Yes
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Other
    Re: Copy and....
    « Reply #6 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.

    Fen_Li



      Beginner

    • G-Smart thing Smart
    • Thanked: 2
      Re: Copy and....
      « Reply #7 on: September 10, 2007, 12:23:52 PM »
      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...
      ..Still Newbie KID..

      contrex

      • Guest
      Re: Copy and....
      « Reply #8 on: September 10, 2007, 12:38:25 PM »
      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.

      « Last Edit: September 10, 2007, 01:16:36 PM by contrex »

      Calum

      • Moderator


      • Egghead

        Thanked: 238
        • Yes
        • Yes
      • Certifications: List
      • Computer: Specs
      • Experience: Beginner
      • OS: Other
      Re: Copy and....
      « Reply #9 on: September 10, 2007, 01:00:56 PM »
      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.
      « Last Edit: September 10, 2007, 01:27:33 PM by Calum »

      FORMAT

      • Guest
      Re: Copy and....
      « Reply #10 on: September 11, 2007, 08:03:08 AM »
      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!  ;)

      contrex

      • Guest
      Re: Copy and....
      « Reply #11 on: September 11, 2007, 08:51:55 AM »
      What do you mean "copy the same file automatically". Why would you want many copies of the same file in one folder?

      ghostdog74



        Specialist

        Thanked: 27
        Re: Copy and....
        « Reply #12 on: September 11, 2007, 09:18:02 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.

        FORMAT

        • Guest
        Re: Copy and....
        « Reply #13 on: September 12, 2007, 08:20:09 AM »
        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!