I have this code below
Private Sub Command1_Click()
Dim f1 As Integer, songpath As String, mp3path As String, f2 As Integer, i As Integer
VB Code:
mp3path = "C:\test\my_mp3s" f2 = FreeFile Open mp3path & "mp3.txt" For Output As #f2 ' if you don't need mp3.txt take out f1 = FreeFile Open mp3path & "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
this then prints this
<?xml version="1.0"?>
<songs>
<song path="C:\test\my_mp3s02-Never Say Goodbye.mp3" title="02-Never Say Goodbye.mp3"/>
</songs>
my question is - is there any way that this will work but remove the c:\test\ when written.
thanx




Reply With Quote