Results 1 to 30 of 30

Thread: help please [RESOLVED]

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2005
    Posts
    277

    Resolved help please [RESOLVED]

    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:
    1. mp3path = "C:\test\my_mp3s"
    2.    
    3.      f2 = FreeFile
    4.     Open mp3path & "mp3.txt" For Output As #f2       ' if you don't need mp3.txt take out
    5.      f1 = FreeFile
    6.      
    7.     Open mp3path & "audiolist.xml" For Output As #f1
    8.     Print #f1, "<?xml version=""1.0""?>"
    9.     Print #f1, "<songs>"
    10.     songname = Dir(mp3path & "\*.mp3")   ' get first track
    11.     i = 1
    12.     While Not Len(songname) = 0
    13.         songpath = "<song path=""" & mp3path & songname & """ title=""" & songname & """/> "
    14.         Print #f1, songpath
    15.         Print #f2, songname                  ' for mp3.txt
    16.         Sleep 100                                ' slight pause, needed
    17.         songname = Dir                         ' get next track
    18.    
    19.     Wend
    20.     Print #f1, "</songs>"
    21.  
    22.  
    23. Close
    24. 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
    Last edited by robvr6; Feb 3rd, 2005 at 12:35 PM. Reason: resolved

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width