Get modified date of open file

Please can someone assist me.
I need to check the modified date of a file that sometimes is open.

How can I do achieve this?
antoniokingAsked:
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.

Martin LissOlder than dirtCommented:
MsgBox FileDateTime("C:\My Path\test.txt")
0
antoniokingAuthor Commented:
Hi Martin
I have tried your suggestion but receive the following error..
Type mismatch: 'FileDateTime'

Regards
0
Martin LissOlder than dirtCommented:
What type of Visual Basic are you using? VBA? VB6? .Net?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

antoniokingAuthor Commented:
I'm just creating a VB Script.
0
Martin LissOlder than dirtCommented:
I don't do vbScript but maybe this is what you need.
0

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
antoniokingAuthor Commented:
Thanks Martin
that's what I was using, but I need to be able to check the modified stamp whilst the file is opened.
This code doesn't allow that, it generates an error that the file doesn't exist if it's open.
0
Martin LissOlder than dirtCommented:
Have you tried using fso? Other than that I'm out of ideas. It also may be that you can't do what you want in vbScript, but as I said I'm not familiar with it so I don't know one way or the other.

If fso doesn't work for you then 'Request attention' and ask the moderators to add the vbScript topic to this question.
0
antoniokingAuthor Commented:
Thanks for this,
I have overcome my issue by copying the file using the CopyFile function and then checking the modified date of the copied file.
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
Visual Basic Classic

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.