Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Macros / July 2006

Tip: Looking for answers? Try searching our database.

Finding the create data of a file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stephen English - 25 Jul 2006 04:44 GMT
I have hundreds of files in a folder that I am reading using the File System
Object.  I want to find the CreateDate of the file (i.e the file date as you
see it it Windows Explorer).   I don't seem to be able to get it from the
FileSystem Object.   Is there another object that will give me this info
please?
Regards
Stephen
jmonty - 25 Jul 2006 20:06 GMT
This may or may not work. Try:

'The following uses some of the FSO File's properties
'to display information about a file.

Private Sub displayFileInfo(ByVal fileName As String)
   Dim fso As New FileSystemObject
   Dim fileSpec As File
   Dim strInfo As String
   Set fileSpec = fso.GetFile(fileName)
   strInfo = fileSpec.Name & vbCrLf
   strInfo = strInfo & "Created: "
   strInfo = strInfo & fileSpec.DateCreated & vbCrLf
   strInfo = strInfo & "Last Accessed: "
   strInfo = strInfo & fileSpec.DateLastAccessed & vbCrLf
   strInfo = strInfo & "Last Modified: "
   strInfo = strInfo & fileSpec.DateLastModified
   MsgBox strInfo, vbInformation, "File Information"
   Set fileSpec = Nothing
End Sub

jmonty

> I have hundreds of files in a folder that I am reading using the File System
> Object.  I want to find the CreateDate of the file (i.e the file date as you
[quoted text clipped - 3 lines]
> Regards
> Stephen
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.