Recursively Delete Empty Folders

Category:
Files and Directories
Type:
Snippets
Difficulty:
Intermediate
Author:
Anonymous

Version Compatibility: Visual Basic 6

More information:
This subprocedure, DeleteEmptyFolders, recursively deletes empty folders from a given directory. Simply pass the folder path as string to the method, such as DeleteEmptyFolders(strFolderPath).

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

Declarations:

Code: