This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to get file created date in Java?