[windows2000] Re: Finding Access 97 databases

  • From: "Ray at work" <listray@xxxxxxxxxx>
  • To: <windows2000@xxxxxxxxxxxxx>
  • Date: Thu, 4 Nov 2004 19:52:26 -0500

When I ran this, I ran it against a network drive.  All fine.  Then when I
ran it against C:\, it errored out when it hit C:\System and Volume
Information or whatever that damn system directory is called.  So, I
modified the script to skip system directories:

Sub MDBSearch(Pathroot)
        Dim oDir, oSubdir, oFile

        Set oDir = oFSO.GetFolder(Pathroot)
        For Each oSubdir in oDir.SubFolders
                '''4 is the constant for System attribute
                If Not CBool(oSubdir.Attributes And 4) Then Call

        For Each oFile in oDir.Files
                If LCase(oFSO.GetExtensionName(oFile.Path)) = "mdb" Then
Call LogIt(oFile.Path, AccessVersion(oFile.Path))
End Sub

> -----Original Message-----
> From: windows2000-bounce@xxxxxxxxxxxxx 
> [mailto:windows2000-bounce@xxxxxxxxxxxxx] On Behalf Of Ray at work
> Sent: Thursday, November 04, 2004 7:30 PM
> To: windows2000@xxxxxxxxxxxxx
> Subject: [windows2000] Re: Finding Access 97 databases
> Hi Cristoph,
> You can use DAO to determine the Access version.  3.0 = 97.  
> 4.0 = 2000.  I
> ~believe~ that 2002 and 2003 will also be returned as 4.0, as 
> they all use
> the same file format.  Try this script.  It successfully 
> generated a CSV
> file for me.  Just change the values of PATH_ROOT and LOG_FILE to what
> directory you want to search in and what file path the the 
> results should be
> written to, respectively.  If you use a drive letter as your 
> include the \ as I have done here.
> Option Explicit
> Const PATH_ROOT = "C:\"
> Const LOG_FILE = "C:\AccessVersions.csv"

This Weeks Sponsor StressedPuppy.com Games
Feeling stressed out? Check out our games to
relieve your stress.
To Unsubscribe, set digest or vacation
mode or view archives use the below link.


Other related posts: