|
-
Dec 7th, 1999, 03:07 AM
#1
Thread Starter
_______
I have a folder "Myfolder" and in it I have multiple files, say 10 for arguments sake.
Is there a function which will tell me last date modified...I am running a job which should change data in all files of MyFolder...sometimes it doesn't..
So I need to read the last date modified of all files in Myfolder and then send a message if one of the 10 doesn't have a modified date to match todays date.
Thanks,
Wayne
-
Dec 7th, 1999, 03:37 AM
#2
New Member
here is a rounting using a filesystem object that is an easy way to get the timestamp. This uses the scrrun.dll if you are distributing this code to others in your program.
Sub ShowFileInfo(filespec)
Dim fs, f, s
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile(filespec)
s = "Created: " & f.DateCreated
MsgBox s
End Sub
-
Dec 7th, 1999, 03:39 AM
#3
New Member
....there is alsow a DateLastModified property on this object that is probably closer to what you are looking for
Sub ShowFileAccessInfo(filespec)
Dim fs, f, s
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile(filespec)
s = UCase(filespec) & vbCrLf
s = s & "Created: " & f.DateCreated & vbCrLf
s = s & "Last Accessed: " & f.DateLastAccessed & vbCrLf
s = s & "Last Modified: " & f.DateLastModified
MsgBox s, 0, "File Access Info"
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|