Click here to Skip to main content
15,887,676 members

Comments by Member 13941960 (Top 6 by date)

Member 13941960 9-Aug-18 0:03am View    
Thank you it is working
Member 13941960 8-Aug-18 6:36am View    
I added and tried it's notworking
Member 13941960 8-Aug-18 6:35am View    
File dir = new File(dirPath);
File[] files = dir.listFiles();
if (files == null || files.length == 0)
{
return null;
}
File lastModifiedFile = files[0];
for (int i = 1; i < files.length; i++)
{
if (lastModifiedFile.lastModified() < files[i].lastModified())
{
lastModifiedFile = files[i];

System.out.println(lastModifiedFile);

}
}
return lastModifiedFile;
}
This was my code ...
Am able to print the recently updated filenames .
In the same way i want to print the filenames upadted last 15 minutes.
Member 13941960 8-Aug-18 6:17am View    
If am add this snippet to my code the program get terminated.
Member 13941960 8-Aug-18 5:42am View    
Am not able to get updated file name..