I am experiencing wired behaviour using renameTo(). Can anyone lemme know wats the exact reason.
I have set of directories and file names in .properties file and i'm retriving those values and trying to move the file to temp directory
File f1 = new File(incoming+arrdirectories[i]+"
File f2 = new File(incoming+arrdirectories[i]+"\\"+"
If in case i provide
1 directory and 1 file, its moving the file
2 directory and 2 files, its moving only 2nd file.
3 directory and 3 files, its moving only 3rd file.
4 directory and 4 files, its moving only 4th file.
5 directory and 5 files, its moving all files.
6 directory and 6 files, its moving all files except last file.
NOTE: i'm not moving existing files. I have taken care of code part i.e. values from properties file are retrived properly.