VoiceGuide IVR Software Main Page
Jump to content

Filedatetime

Recommended Posts

How do I find the date a file was last modified? Tried using VBS module with no luck.

 

Dim STRJobDate

 

STRJobDate = cstr(FILEDATETIME("c:\test.wav")

 

But all I get are VBS errors. what am I doing wrong?

Share this post


Link to post

Although FileDateTime() is supportd in VBA I'm not too sure if it is supported in VBScript. But you can use the FileSystemObject in VBS to get the same information (an much more...)

 

The code would be:

 

Dim fso, f, strDateCreated

Set fso = CreateObject("Scripting.FileSystemObject")

Set f = fso.GetFile("c:\test.wav")

strDateCreated = f.DateCreated

 

more information on FileSystemObject can be found at:

 

MSDN Help on FileSystemObject

 

and the above example was found in:

 

http://msdn.microsoft.com/library/default....datecreated.asp

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×