Tuesday, January 18, 2011

Create 1000 folder with a single command in windows XP

1. start --> All programs --> Accessories --> Command Prompt
2. type "fOR /L %i in (1,1,1000) DO mkdir %i"
 note: you can change 1000 to 10000 to create ten thousand folders, try it yourself, please leave me any comment.

5 comments:

  1. how can we create a txt file same name as folder it is located in, in very folder?

    ReplyDelete
  2. :D :D

    let's try my simple perl script

    #!/usr/bin/perl
    while ( $i <=1000 ){
    mkdir $i;
    open (EP,">$i/$i");
    $i++;
    }

    if u want to create the file with .txt extension, try with this:

    #!/usr/bin/perl
    while ( $i <=1000 ){
    mkdir $i;
    open (EP,">$i/$i.txt");
    $i++;
    }

    ------------------
    nothing is impossible.
    ;)

    ReplyDelete
  3. save above script into fail then execute on terminal in LINUX.
    if u want to execute in windows. u have to install perl first.

    ;)

    ReplyDelete