I have code for copying files to a folder using commondialog.
would it be much different to implement a similar feature to allow users to remove files. Heres the code used for adding.
VB Code:
Private Sub Command2_Click() Dim f1 As Integer, songpath As String, xmlpath As String, songname As String, mp3path As String, f2 As Integer, i As Integer xmlpath = "C:\Program Files\mgamerz\" mp3path = "C:\Program Files\mgamerz\my_mp3s\" f2 = FreeFile Open mp3path & "mp3.txt" For Output As #f2 ' if you don't need mp3.txt take out f1 = FreeFile Open xmlpath & "audiolist.xml" For Output As #f1 Print #f1, "<?xml version=""1.0""?>" Print #f1, "<songs>" songname = Dir(mp3path & "\*.mp3") ' get first track i = 1 While Not Len(songname) = 0 songpath = "<song path=""" & mp3path & songname & """ title=""" & songname & """/> " Print #f1, songpath Print #f2, songname ' for mp3.txt Sleep 100 ' slight pause, needed songname = Dir ' get next track Wend Print #f1, "</songs>" Close End Sub
Thanks Rob




Reply With Quote