import java.io.*;
import java.util.*;
class he{
public static void main(String[] args)throws IOException{
File f=new File("d://Capture");
File fileList[]=f.listFiles();
for(int i=0;i<fileList.length ;i++){
Random rand=new Random();
int cc=rand.nextInt(10000)+1;
System.out.println(cc);
String fileName=fileList[i].getName();
String fileType=fileName.substring(fileName.lastIndexOf(".")+1,fileName.length());
System.out.println(fileType);
System.out.println(fileList[i].getName());
fileList[i].renameTo(new File("d://Backup//" + fileList[i].getName()));
}
}
}