Do you want to delete the directory, or the files in the directory(and leave the directory)?
if you want to delete the directory,
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject"
fso.DeleteFolder("c:\MyDir\"
If you want to delete the files
Dim fso, f, f1, fc
Set fso = CreateObject("Scripting.FileSystemObject"
Set f = fso.GetFolder(folderspec)
Set fc = f.Files
For Each f1 in fc
f1.delete
Next
Note: I haven't tested any of these.
______________________________
- David Lanouette
- Lanouette Consulting, LLC
- DLanouette@Computer.org
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.