tried that but still havin no joy with the xml file it is continuing to write the full path indstead of just
<?xml version="1.0"?>
<songs>
<song path="my_mp3s/.mp3"artist="" title=""/>

</songs>


VB Code:
  1. Private Sub Command2_Click()
  2. Dim f1 As Integer, xmlpath As String, songpath As String, mp3path As String, f2 As Integer, i As Integer
  3.    Dim MyPath As String
  4.   Dim Artist As String, SongName As String, artname As String, fname As String, mp3Path2 As String
  5.  
  6.     Dim mytag As Boolean
  7.    mp3path = "C:\Program Files\mgamerz\my_mp3s\"
  8.    xmlpath = "C:\program files\mgamerz\ "
  9.      MyPath = Right(mp3path, (Len(mp3path) - Len(xmlpath) + 1))
  10.  
  11.      mp3Path2 = "my_mp3s\"
  12.  
  13.      
  14.      SongName = Dir(mp3path & "\*.mp3")
  15.      fname = mp3path & SongName
  16.      
  17.             With Form4
  18.    
  19.     While Not Len(SongName) = 0
  20.        
  21. '        Artist = GetMP3Tag(fname)
  22.                 If Not i = 0 Then
  23.                     Load .Label1(i): Load .Text1(i)
  24.                     .Label1(i).Top = .Label1(i - 1).Top + 350
  25.                     .Text1(i).Top = .Text1(i - 1).Top + 350
  26.                     .Label1(i).Visible = True: .Text1(i).Visible = True
  27.                    
  28.                 End If
  29.                
  30.                 .Label1(i) = SongName
  31.                 mytag = GetMP3Tag(fname)
  32.                 .Text1(i) = RTrim(MP3Info.sArtist)
  33.                      
  34.  
  35.         SongName = Dir
  36.              fname = mp3path & SongName
  37.  
  38.         i = i + 1
  39.    
  40.     Wend
  41.                 .Height = .Text1(.Text1.Count - 1).Top + 1600
  42.                 .TAG = mp3path
  43.                 MDIForm1.Caption = "You must close this form before continuing"
  44.                 .Show
  45. '                .WindowState = 2
  46.             End With
  47.     TAG = "wait"
  48.     While TAG = "wait"
  49.     DoEvents
  50.     Wend
  51.    
  52.      
  53.    i = 1
  54.      f2 = FreeFile
  55.     Open mp3path & "mp3.txt" For Output As #f2
  56.      f1 = FreeFile
  57.      
  58.     Open xmlpath & "audiolist.xml" For Output As #f1
  59.    
  60.    
  61.     Print #f1, "<?xml version=""1.0""?>"
  62.     Print #f1, "<songs>"
  63.     SongName = Dir(mp3path & "\*.mp3")
  64.     i = 1
  65.     While Not Len(SongName) = 0
  66.        
  67.         ' if you can return the name of the artist you put the code in here
  68.  
  69.                 mytag = GetMP3Tag(mp3path & SongName)
  70.                 Artist = RTrim(MP3Info.sArtist)
  71.                  If Len(Artist) = 0 Then Artist = "UNKOWN"
  72.    
  73.        
  74.        songpath = "<song path=""" & MyPath & """ artist=""" & Artist & """ title=""" & SongName & """/> "
  75.        
  76.         Print #f1, songpath
  77.         Print #f2, SongName
  78.         Sleep 100
  79.         SongName = Dir
  80.    
  81.     Wend
  82.  
  83.     Print #f1, "</songs>"
  84. Close
End Sub