How can i get the date of when a file was modified?
Thanks in advance!
Printable View
How can i get the date of when a file was modified?
Thanks in advance!
Hi!
The easiest way I know is to use the FileSystemObject.
(You have to add 'Microsoft Scripting Runtime' to your references)._______________Code:Dim fso As FileSystemObject
Set fso = New FileSystemObject
Dim fle As File
Set fle = fso.GetFile("C:\Autoexec.bat")
MsgBox "Modified: " & fle.DateLastModified
Regards
da_bob
I think somebody have post the simple solution with create any Object like FileSystemObject.
Code:Format(FileDateTime(<Your FileName>, "dd/mm/yyyy") & " " & Format(<Your FileName>), "h:mm:ss AMPM")
Thanks for the reply, ill look into that right now!
Just a correction, this is how the code should look like.Code:TimeX = Format(FileDateTime(File), "dd/mm/yyyy") & " " & Format(FileDateTime(File), "h:mm:ss AMPM")
;)
This format method works great, but it gives me the time the file was accessed not modified.
Is there any way i can change that?
[Edited by invitro on 06-21-2000 at 03:27 PM]