Two Different Ways of Listing All Files in a Directory
Author: Intelligent Solutions Inc.
Version Compatibility: Visual Basic 6
Though the API method is supposedly faster, the Dir function was faster in this case, in my tests at least. However, this probably has a lot to do with all the attribute checking done in the second function, which is required to make it generic and to ensure that subdirectory names are not included. You may get different results if you change the code for your own purposes.
Refer to the comments for more information about what these functions do and how to call them.
Instructions: Copy the declarations and code below and paste directly into your VB project.