Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Searching for a file

 
Priyadharshini Nagarajan
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

i have a directory which contains the log files. the file name format is date_time. my application will get the date as input from the user. Then i have to search for that log file with that date input as filename.


eg: my log file directory contains these log files

Name Modified time
05-02-05_10:36 05/02/05 10:40
05-02-05_10:38 05/02/05 10:45
05-02-05_10:40 05/02/05 10:50
05-03-05_10:37 05/03/05 10:40

input : 05_02_05

so i have to take the file with the latest modified time ie 05-02-05_10:40
 
Joe Ess
Bartender
Posts: 9362
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And your question is what?
How to get the contents of a directory? Have a look at java.io.File.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!