Use Recursion to Visually list files and folders

Category:
Files and Directories
Type:
Snippets
Difficulty:
Intermediate
Author:
Stanley Switaj

Version Compatibility: Visual Basic 6

More information:
1) Will recursively list files and folders under a specified folder set by a DirListBox 2) Visually shows the file and directory hierarchy by indenting lower level of files and folders within the ListBoxes 3) Create 2 listboxes, 1 command button, and 1 DirListBox, use default names given (List1, List2, Command1, Dir1)

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: