New course! Every coder should learn Generative AI!
Try a free lesson+ 1
C#
please can anyone help me with the code to delete pictures from a folder using c#
1 Answer
0
File.Delete:
https://docs.microsoft.com/en-us/dotnet/api/system.io.file.delete
To delete a single file.
Directory.GetFiles:
https://docs.microsoft.com/en-us/dotnet/api/system.io.directory.getfiles
If you have to search files first.
Directory.Delete:
https://docs.microsoft.com/en-us/dotnet/api/system.io.directory.delete
If you just want to delete the complete folder.