File Attributes

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Mar 2005
Posts: 71
Reputation: NewVBguy is an unknown quantity at this point 
Solved Threads: 3
NewVBguy NewVBguy is offline Offline
Junior Poster in Training

File Attributes

 
0
  #1
Mar 16th, 2005
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
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: File Attributes

 
0
  #2
Mar 16th, 2005
Let Me know if this works for ya

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. dim fso
  2. dim f
  3. Set fso = CreateObject("Scripting.FileSystemObject")
  4. Set f = fso.GetFile("C:\boot.ini")
  5.  
  6. CreatedDate = f.DateCreated
  7. LastAccessed = f.DateLastAccessed
  8. LastModified = f.DateLastModified
  9. FileSize = f.Size
  10.  
  11. msgbox "Created Date: " & CreatedDate
  12. msgbox "Last Access: " & LastAccessed
  13. msgbox "Last Modified: " & LastModified
  14. msgbox "File Size: " & FileSize
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 71
Reputation: NewVBguy is an unknown quantity at this point 
Solved Threads: 3
NewVBguy NewVBguy is offline Offline
Junior Poster in Training

Re: File Attributes

 
0
  #3
Mar 16th, 2005
Hey Comatose,
Thanks again man. You're doing good.

Newvbguy
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC