Hello,
Here is what I'm trying to accomplish here. I have a textbox1 and it is for typing in a FILE name and press add, it adds it to a listbox. Now I want to press Delete From Playlist and when I press that button it deletes the file from the folder.
Currently the code I have works but I need to call all items from the listbox to delete.
So basically I need to the file location to stay the same but change MEDIA01234 to whatever items are in listbox. Items in listbox are alway changing there could be 1 - 100 items.
What do you think we need to do here?
Code:Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click My.Computer.FileSystem.DeleteFile("C:\Server Media\Playback1\Media01234") My.Computer.FileSystem.DeleteFile("C:\Server Media\Playback2\Media01234") End Sub




Reply With Quote
