10:41 AM 1/3/96

COPYRIGHT RESTRICTION:  THIS PROGRAM MAY NOT BE UPLOADED TO ANY SERVICE OTHER
THAN THE COMPUSERVE INFORMATION SERVICE OR THE MICROSOFT NETWORK.

Direct feature requests and tech support ?'s to 72407,243 via CIS MSBASIC, or
RBLevin@msn.com (Internet).

=============================================================================

To view this document:
(1) Load into Windows Notepad
(2) Maximize Notepad
(3) Make sure Edit+WordWrap is OFF

=============================================================================

Hasty Documentation for
Rich Levin's Toolkit Objects (TKO)
Dir32 Component
Version 1.0.0

PRELIMINARY RELEASE

Dir32 has been thoroughly tested and, like all my code, appears to be bug-free.
However, there are a number of extensions contained which have not yet been
enabled.  Future releases will enable these enhancements.

Please direct feedback, feature requests, etc., to the author as described
below.

Dir32 is for use with Microsoft Visual Basic 4.0 32-bit ONLY.

=============================================================================

This archive contains the following files:

Documentation:	Dir32.txt (this file)
Demo file:	Dir32.exe (run for a demo)
DLL:		Dir32.dll (add to VB4's Tools\References to use)

=============================================================================

(C) 1995 RBLevin
All Rights Reserved

LCI
PO Box 14546
Phila., PA 19115

215-887-8281 (voice)
215-887-5485 (fax)

RBLevin@msn.com
72407.243@compuserve.com

Rich Levin is the producer of KYW NewsRadio's PC Report (Phila.), and a
contributing editor to Windows Magazine (CMP).

=============================================================================

Dir32 was developed to help CompuServe MSBASIC members.  At least once a week,
questions such as "How can I create an XCOPY command in VB?", or "How can I
scan the hard disk and find all the .INI files?" are posted.

I developed Dir32 to satisfy these requests.  Dir32 operates like DOS' DIR
command.  You give it a filespec; it returns an array that contains a list of
every matching file.  You use Dir32 much as you would a VB OCX.  Set a few
properties, call a method, and you're off.  A code example appears below.

To install Dir32:
	(1) Copy Dir32.dll to your \Windows\System folder.
	(2) Load VB4, and your project.
	(3) Click Tools\References.
	(4) Scroll through the list until you find Dir32.
	(5) Select Dir32.
	(6) Paste the code sample below.
	(7) Compile and run.

Any error will raise an Err.Number 9500.  Verbose error messages and suggested
solutions are returned in Err.Description.

=============================================================================

Sub DemoDirectoryObject()
'Demonstration of RBL's Dir32 class

    'Properties:
    '    Drive           -- Drive to search (required)
    '    Folder          -- Starting path (required)
    '    Filespec        -- Any valid Win95 filespec (required)
    '    ShowFolder      -- True adds d:\folder\ to filename.ext (Default=F)
    '    ShowSubfolders  -- True causes subfolders to be searched (Default=F)
    '    FilesCount      -- Returns number of files that meet filespec (RO)

    'Method:
    '    Files           -- Returns array of filenames

    Dim Directory as New clsDirectory   'Create new Directory object*
    Dim Files As Variant                'DIR array passed here
    Dim I as Long                       'For/Next loop Index
  
    Directory.Drive = "C:"          'Set drive (required)
    Directory.Folder = "\Windows"   'Set starting path (required)
    Directory.Filespec = "*.INI"    'Set search filespec (required)
    Directory.ShowFolder = True     'Attach folder names (optional)
    Directory.ShowSubfolders = True 'Search subfolders, too (optional)
    
    'Use Files method; pass array of filenames to Files
    Files = Directory.Files

   'Show the files found using the read-only Directory.FilesCount property
    For I = 1 to Directory.FilesCount
        Debug.Print Files(I)
    Next I

    '*Dim the new object in [Declarations] and it will be global to the module.

End Sub

=============================================================================
					###
