Share on Google+Share on Google+

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

Advertisement
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

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

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

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.:)