class pro implements Runnable{
String[] file=new String[11];
int s;
public static void main(String[] args) {
pro test=new pro();
}
pro(){
file[1]="cmd /c \"juman < C:\\work\\data\\1901.txt> C:\\work\\1901.txt\"";
file[2]="cmd /c \"juman < C:\\work\\data\\1902.txt> C:\\work\\1902.txt\"";
file[3]="cmd /c \"juman < C:\\work\\data\\1903.txt> C:\\work\\1903.txt\"";
file[4]="cmd /c \"juman < C:\\work\\data\\1904.txt> C:\\work\\1904.txt\"";
file[5]="cmd /c \"juman < C:\\work\\data\\1905.txt> C:\\work\\1905.txt\"";
file[6]="cmd /c \"juman < C:\\work\\data\\1906.txt> C:\\work\\1906.txt\"";
file[7]="cmd /c \"juman < C:\\work\\data\\1907.txt> C:\\work\\1907.txt\"";
file[8]="cmd /c \"juman < C:\\work\\data\\1908.txt> C:\\work\\1908.txt\"";
file[9]="cmd /c \"juman < C:\\work\\data\\1909.txt> C:\\work\\1909.txt\"";
file[10]="cmd /c \"juman < C:\\work\\data\\1910.txt> C:\\work\\1910.txt\"";
Thread th=new Thread(this);
th.start();
}
public void run(){
s=1;
while(s<11){
try {Runtime.getRuntime().exec(file[s]);
} catch( Exception e ) {System.out.println(e);}
try{ Thread.sleep(5000);
}catch(InterruptedException e){}
s=s+1;
}
}
}
最終更新:2011年06月07日 02:37