Getting the modification date and time of file or folder in Java

In this section, you will learn how to get the last modification date and time of any file or a folder.

C:\nisha>java GetDirectoryAndFileModifiedTime
Enter file or directory name in proper format to get the modification date and time :
myfile.txt
File name : myfile.txt
File modification date and time : Thu Oct 04 16:31:39 GMT+05:30 2007

C:\nisha>

Download this example.

Advertisements

Share on Google+Share on Google+

Getting the modification date and time of file or folder in Java

Posted on: April 16, 2007 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Advertisements

 

Discuss: Getting the modification date and time of file or folder in Java   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:1
Saurabh
June 1, 2011
Thanks

thank you very much.:)

Ads

 

Ads