[AccessD] Date Modified

"Forefront em Informática e Consultoria Ltda." forefront at ig.com.br
Thu Aug 12 16:24:42 CDT 2004


At 05:14 12/08/2004, you wrote:
>Rocky,
>If you set a reference to Microsoft Scripting Runtime then add the 
>following code:
>Dim fsys As New FileSystemObject
>Dim dtProductsCSV As Date
>Dim fProductsCSV As Object
>
>Set fProductsCSV = fsys.GetFile(FilePath & FileName)
>dtProductsCSV = fProductsCSV.DateLastModified
>
>
>Message date : Aug 12 2004, 01:53 AM
> >From : "Rocky Smolin - Beach Access Software"
>To : AccessD at databaseadvisors.com
>Copy to :
>Subject : [AccessD] Date Modified
>Dear List:
>
>Is there a method to retrieve the Date Modified from a file?
>
>TIA
>
>Rocky Smolin
>Beach Access Software
>http://www.e-z-mrp.com
>
>--

You may also try something like this...

Function AccBDInfo(filespec)
On Error GoTo Err_AccBDInfo

   Dim fso, f, s
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set f = fso.GetFile(filespec)
   s = f.Path & vbCrLf
   s = s & "Created: " & f.DateCreated & vbCrLf
   s = s & "Last Accessed: " & f.DateLastAccessed & vbCrLf
   s = s & "Last Modified: " & f.DateLastModified
   'MsgBox Format(f.DateCreated, "Short Date")
   AccBDInfo = s
   Set fso = Nothing
   Set f = Nothing

Exit_AccBDInfo:
     Exit Function

Err_AccBDInfo:
     MsgBox "Ocorreu o erro " & Err.Number & "." & vbCrLf & Err.Description
     Resume Exit_AccBDInfo

End Function

HTH,
******************************************************
* Forefront em Informática e Consultoria Ltda. *
* Carlos Alberto Alves                                   *
* Systems Analyst/Programmer                     *
* Rio de Janeiro, Brazil                                  *
* Phone Direct: 55-21-9169-1596                    *
* mailto:forefront at ig.com.br                           *
******************************************************* 




More information about the AccessD mailing list