File Attributes
Hi,
I want to know the date when is a file was created plus the size of the file.
Can somebody show me a vb code that handle this things. Thanks in advance.
Newvbguy
NewVBguy
Junior Poster in Training
71 posts since Mar 2005
Reputation Points: 13
Solved Threads: 3
Let Me know if this works for ya
dim fso
dim f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFile("C:\boot.ini")
CreatedDate = f.DateCreated
LastAccessed = f.DateLastAccessed
LastModified = f.DateLastModified
FileSize = f.Size
msgbox "Created Date: " & CreatedDate
msgbox "Last Access: " & LastAccessed
msgbox "Last Modified: " & LastModified
msgbox "File Size: " & FileSize
Comatose
Taboo Programmer
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
Hey Comatose,
Thanks again man. You're doing good.
Newvbguy
NewVBguy
Junior Poster in Training
71 posts since Mar 2005
Reputation Points: 13
Solved Threads: 3