[AccessD] Retrieving filename and modified date

Gary Kjos garykjos at hotmail.com
Wed Aug 27 10:04:24 CDT 2003


Hi Jeffrey,

Use Dir function to get the filename. You can use wildcards in it. something 
like
strSearchForFile = "c:\work\clm*.xls"
strSearchResult = dir(strSearchForFile)
will return the filename into the string strSearchResult where you can parse 
through it with a Mid function to get the date out.

To get the modified date you can use the FileDateTime function

Gary Kjos
garykjos at hotmail.com





>From: Jeffrey Majchrzak <jmajchrz at nycap.rr.com>
>Reply-To: Access Developers discussion and problem 
>solving<accessd at databaseadvisors.com>
>To: "accessD at databaseadvisors.com"  <accessD at databaseadvisors.com>
>Subject: [AccessD] Retrieving filename and modified date
>Date: Wed, 27 Aug 2003 14:04:48 GMT
>
>I am working on a project where I need to scan a folder daily to see if
>any new files have been added.  This folder can contain many files but I
>am looking for only the files that start CLMS then have a date.  Example
>CLMS082603.xls.  I need to capture the date in the file name and the
>modified date of the file and save it in a table.  Is this possible?
>Could you please provide code examples of how I would go about doing this?
>
>Thanks in advance for all your help.
>
>Jeffrey Majchrzak
>

_________________________________________________________________
Get MSN 8 and help protect your children with advanced parental controls.  
http://join.msn.com/?page=features/parental



More information about the AccessD mailing list