This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Reading Directory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Reading Directory" Watch "Reading Directory" New topic
Author

Reading Directory

vinod kumar
Greenhorn

Joined: Jan 24, 2005
Posts: 15
Hi all,
I am struck with a problem.
I want to read a folder and find the total number of files inside the folder. I also want to access the modified date of the file (To delete the first modified file if the count exceeds some value)...
Please help me out..Any info regarding this is welcome


Thanks in advance
Gareth Faulkner
Greenhorn

Joined: Oct 29, 2004
Posts: 22
You just need to use the java.io.File class
http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html

I have some sample code if you need any more help with this...

Gareth
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Reading Directory
 
Similar Threads
folder chooser
Query! Reading last modified/latest file
Reading Directory
Modification of JSP file using ANT
File Issues