How to delete multiple files at once in C# winForm
- Hadsis community owner
- Jun 28, 2020
- 1 min read

in this tutorial, I'll be guiding you on how to make a C# winForm application that can delete multiple files
note: the program will delete files in a subfolder so if a folder contains a subfolder and that subfolder also contain a file then that file itself will be deleted
just follow these steps
Step 1: create your new project
I'll be using visual studio 2019 because visual studio is a professional IDE (Integrated development environment) and it's highly suitable for this job.



Step 2: add CheckedListBox to your main form



Step 3: add two textbox



Step 4: add 3 buttons



Step 5: add a code to the 3 dotted button


step 6: add the code: using system.IO;

Step 7: add a code to 'list files' button


Final step = Step 8: add the code to 'delete' button



after that, you are ready to test your program. basically you are done
Comments