Ishmael Member Mar 16, 2023 #1 I want to delete a folder which contains bunch of files but file.delete says the folder must be empty. The parent folder Tree can sometimes contain child folders upto 6 levels. Example Parent Folder A contains B B contains folder C D E and some files. C contains folder FG and some files F contains files G contains folder X YZ and files The folders are generated dynamically with different structures Is there a way to delete all folders at once without opening all individual folders and clearing them first? Like Deleting Parent Folder A which will delete everything
I want to delete a folder which contains bunch of files but file.delete says the folder must be empty. The parent folder Tree can sometimes contain child folders upto 6 levels. Example Parent Folder A contains B B contains folder C D E and some files. C contains folder FG and some files F contains files G contains folder X YZ and files The folders are generated dynamically with different structures Is there a way to delete all folders at once without opening all individual folders and clearing them first? Like Deleting Parent Folder A which will delete everything
P PaulMeuris Well-Known Member Licensed User Mar 18, 2023 #2 This requires a recursive subroutine like the one shown in this thread: Copy/delete folders and files Upvote 0
This requires a recursive subroutine like the one shown in this thread: Copy/delete folders and files