Note: This code requires that you add a reference to the Microsoft Scripting Runtime type library.
This example will delete “C:\Temp” directory and all its sub-directories.
Dim fso As New Scripting.FileSystemObject
fso.DeleteFolder “c:\temp”, True
That was all.