Thanks for fast reply.
I guess you are retrieving the last modification time in each iteration?
Nope, I'm getting all data here:

PHP Code:
 List<String_Local_Files getLocalFiles(new File(Config._SDCARD_DIR), null);  //Getting array with Local Files in phone files names + files date eg. "/00/22.jpg;2012-04-13"
 
List<String_FTP_Files getFTPfiles();  //Array with FTP files names + files date eg. "/00/20.jpg;2012-06-13"
 
List<String_Files_Need = new ArrayList<String>(); //new array 
Better to retrieve every date (local + ftp) and save it in an array with a structure for two fields (string name, date lastModification) and just compare those two arrays.
Can you give me some example? I'm new in Java, so i can't understand everything. I'm already comparing two arrays: 1.Check if filename in array1 equals in array2 (same file), then file exist, else - [Add missing file]. 2.Compare date in array1 to array2, if date in local array is < (older) than date in ftp array - [Add missing file]

Thanks.