Getting Last Modified Date from a file name

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.
rebornassassinAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rebornassassinAuthor Commented:
i need the time as well
this solves half the problem
0
rebornassassinAuthor Commented:
ok got it
0
shah1d1698Commented:

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
sajuksCommented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.