Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

urgent... get file creation date

Status
Not open for further replies.

ac71ve

Programmer
Aug 26, 2002
1
AU
hi i have been trying to get a files creation date but have not found any way.. is there a java method to do this or some sort of api i can get to find this information.

thanks for the help
 

File f = new File("C:/test.txt");
System.out.println(f.lastModified());

will give you the last time the file was modified. Bear in mind though that File.lastModified() returns a long - which is the number of milliseconds from 01/01/1970 !!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top