Is it possible to delete all the subfolders (with content) and files within a folder?
For example:
- Backup
- November
- pic1.jpg
- pic2.jpg
- December
- January
- pic3.jpg
- example1.txt
- example2.txt
- example3.txt
- November
There is a root folder (Backup). This root folder contains 3 subfolders (with content) and 3 text files. How can I delete the whole content (3 subfolders and 3 files) of the Backup folder without deleting the root folder (Backup) itself?
The Directory class has a Delete method that accepts a parameter that forces the deleting operation recursively on the folder passed
FROM MSDN Directory.Delete