|
-
Jun 20th, 2000, 11:10 AM
#1
Thread Starter
Fanatic Member
Getting the info of a file.. like when it was created.
How can i get the date of when a file was modified?
Thanks in advance!
ok, so... windows takes 1 minute to search for a file on my PC yet google.com takes 1 second to search the entire internet? 
-
Jun 20th, 2000, 12:30 PM
#2
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
-
Jun 20th, 2000, 01:20 PM
#3
PowerPoster
FileDateTime Function
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")
-
Jun 20th, 2000, 01:39 PM
#4
Thread Starter
Fanatic Member
Thanks for the reply, ill look into that right now!
ok, so... windows takes 1 minute to search for a file on my PC yet google.com takes 1 second to search the entire internet? 
-
Jun 21st, 2000, 02:03 AM
#5
Thread Starter
Fanatic Member
Code:
TimeX = Format(FileDateTime(File), "dd/mm/yyyy") & " " & Format(FileDateTime(File), "h:mm:ss AMPM")
Just a correction, this is how the code should look like.

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]
ok, so... windows takes 1 minute to search for a file on my PC yet google.com takes 1 second to search the entire internet? 
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
|