aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes how to get file created date in Java? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "how to get file created date in Java?" Watch "how to get file created date in Java?" New topic
Author

how to get file created date in Java?

Ernest Lee
Ranch Hand

Joined: Aug 20, 2001
Posts: 145
any one?
John McAlroy
Greenhorn

Joined: Oct 09, 2002
Posts: 4
Date d = new Date(new File("filename.txt").lastModified());
Creation date is forgotten after the file is modified so lastModified() is all you can get.
 
 
subject: how to get file created date in Java?