0

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

2
Contributors
2
Replies
4
Views
12 Years
Discussion Span
Last Post by NewVBguy
0

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
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.