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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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.
 
Don't get me started about those stupid light bulbs.
 
subject: how to get file created date in Java?