An example is a list of files uploaded to the listbox:
C:\Users\Tatyana\Desktop\ts\1.txt C:\Users\Tatyana\Desktop\test2\2.mp3 C:\Users\Tatyana\Desktop\file\backup\4.pdf When you click on the button, you need to delete all these files.
I tried to do this, but it’s not convenient, because every time you need to select - the path to the file and press the button.
DeleteFile(ListBox1.Items[ListBox1.ItemIndex]);