How to delete folder and its subfolders
Visual Basic
2
Posts
2
Posters
0
Views
1
Watching
-
How to delete all folder starting with the characters "abc"? All sub folders should be deleted too and the deletion should work even some folders had files in them.
-
How to delete all folder starting with the characters "abc"? All sub folders should be deleted too and the deletion should work even some folders had files in them.
This is very easily done with the Directory class and it's Delete method.
Directory.Delete(path, True)
The True parameter is necessary to delete everything inside the target directory, all of it's subdirectories and files.
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007