String Sl list Dl list int len1 Sl length len2 Dl length for len1 File

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
String[] Sl=s.list(), Dl=d.list();
int len1=Sl.length,len2=Dl.length,i,j;
for(i=0;i<len1;i++) {
File f1 = new File(d + "/" + Dl[i]);
//если f1=файл
if(f1.isFile()) {
for (j = 0; j < len2; j++) {
File f2 = new File(s + "/" + Sl[i]);
if(f2.isFile() && f1==f2)
continue;
}
}
}