?
Solved

Getting Last Modified Date from a file name

Posted on 2004-11-22
7
Medium Priority
?
178 Views
Last Modified: 2010-03-31
Hi,
I know how to set a "lastModifiedDate" but not how to get it from a file. I read somewhere that the timestamps are stored in a Directory Record. Any way the questions is,
I need a method which will return the date and time of when the file was last modified.
0
Comment
Question by:rebornassassin
  • 2
  • 2
5 Comments
 
LVL 33

Accepted Solution

by:
sajuks earned 200 total points
ID: 12651372
0
 

Author Comment

by:rebornassassin
ID: 12651750
i need the time as well
this solves half the problem
0
 

Author Comment

by:rebornassassin
ID: 12651764
ok got it
0
 
LVL 2

Expert Comment

by:shah1d1698
ID: 12654596

What if I needed to find out the last modified date & time of a file that was not created by a JAVA program.

Say I created a file named abc.doc in Microsoft Word on 11th November of 2004 and wrote something in it. Now,  on the 22nd of November, I want to find out the last modified date & time of the file abc.doc from a JAVA program. What method should I use....Or the comment posted by SAJUKS will work..
0
 
LVL 33

Expert Comment

by:sajuks
ID: 12831895
The question was answered correctly be me as indicated  by the askers last commen(rebornassasin).The final post is by some other person and not the original asker. So i do deserve the points :-)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses
Course of the Month15 days, 6 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question