So I’ve noticed if I try to delete a file/dir that has sub files and folders/dirs in them, it will not get deleted unless I go and manually delete them out first.
Does anybody have a good routine that will go in and delete all sub files and folders/dirs?
A recursive sub that copies a complete folder. Private Sub CopyFolder(Source As String, targetFolder As String) If File.Exists(targetFolder, "") = False Then File.MakeDir(targetFolder, "") For Each f As String In File.ListFiles(Source) If File.IsDirectory(Source, f) Then...
how to: list all files in the folder and also sub folders delete folder that include subfolder and files (Note :file.delete work only for empty folder)
A recursive sub that copies a complete folder. Private Sub CopyFolder(Source As String, targetFolder As String) If File.Exists(targetFolder, "") = False Then File.MakeDir(targetFolder, "") For Each f As String In File.ListFiles(Source) If File.IsDirectory(Source, f) Then...
how to: list all files in the folder and also sub folders delete folder that include subfolder and files (Note :file.delete work only for empty folder)