/*Programmed by: Maan Asghar 11 march 2004
 *list Generater: create a txt file with links to be used with
 * downloading programs like download acclereter
 * used for files that are named by numbers like 001pic & 002pic.jpg
 */
 
import java.io.*;

public class listgenerater
{
 public static void main(String[] args)throws IOException
 {
  
  int start=0;   //Starting number in file name like naruto"102".jpg     
  
  int end=1;    // Last file number in file name  like naruto"254".jpg 
  
  //the link that host the files
  String link="http://membres.lycos.fr/images/Comics/DangerGirl/DangerGirl";
  
  String ext=".jpg";
  
  /*
    type of the file names
    
    type 1: from the start to the end going down 300->100
      dose not work with 001 "zeros on the left"
  
    type 2: from start to end going up 001->200
   use only one integer, support zeros on the left
  */
  int listtype=2;
  
  
  
  if(listtype==1)
  {
   typePrint1(link,ext,start,end);
  }
  else if(listtype==2)
  {
   typePrint2(link,ext,start,end);
  }
 }


 public static void typePrint1(String a,String b,int c,int d) throws IOException
 {
  PrintWriter P=new PrintWriter(new FileWriter("list.txt"));
  while(d>=c)
  {  
   P.println(a+c+b);
   d--;
  }
  P.close();
 }
 
 public static void typePrint2(String a,String b,int c,int d) throws IOException
 {
  PrintWriter P=new PrintWriter(new FileWriter("list.txt"));
  int n=c;
  while(n<=d)
  {
   int n1=0;
   while(n1<10)
   {
    int n2=0;
       while(n2<10)
       {
     P.println(a+n+n1+n2+b);
       n2++;
    }
    n1++;
   }
   n++;
  }
  P.close();
 }
}