Stephen,
Set your refs as per the attached gif, then use this:
Function GetCreateDate(tFileName As String) As String
'---------------------------------------------------------------------------------------
' Procedure : GetCreateDate
' DateTime : 11/21/2005 17:55
' Author : gmaddux
' Purpose : ']\ em: 20060706-16:36 - THIS NOW GETS THE DATE MODIFIED BECAUSE OUR SYSTEM CHANGES THE CREATE DATE
'---------------------------------------------------------------------------------------
'
On Error GoTo GetCreateDate_Error
Dim oFS As Scripting.FileSystemObject
Dim oFL As Scripting.File
Set oFS = CreateObject("Scripting.FileSystemObject")
Set oFL = oFS.GetFile(tFileName)
'GetCreateDate = Format$(oFL.DateCreated, "mm-dd-yyyy")
GetCreateDate = Format$(oFL.DateLastModified, "mm-dd-yyyy")
'Wscript.Echo "Date created: " & oFL.DateCreated
'Wscript.Echo "Date last accessed: " & oFL.DateLastAccessed
'Wscript.Echo "Date last modified: " & oFL.DateLastModified
'Wscript.Echo "Drive: " & oFL.Drive
'Wscript.Echo "Name: " & oFL.Name
'Wscript.Echo "Parent folder: " & oFL.ParentFolder
'Wscript.Echo "Path: " & oFL.Path
'Wscript.Echo "Short name: " & oFL.ShortName
'Wscript.Echo "Short path: " & oFL.ShortPath
'Wscript.Echo "Size: " & oFL.Size
'Wscript.Echo "Type: " & oFL.Type
GetCreateDate_Exit:
On Error GoTo 0
If Not (oFL Is Nothing) Then
Set oFL = Nothing
End If
If Not (oFS Is Nothing) Then
Set oFS = Nothing
End If
Exit Function
GetCreateDate_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure GetCreateDate " & _
"of Module utils_nch"
GoTo GetCreateDate_Exit
Resume
End Function
NOTE: you should actually use the first property to get the createdate, BUT in my use, the files are copied from our server; so the actual create date is the previous modified date.
Gene