What's wrong with this code?
Ok, this code loops through a filelistbox splitting up filenames such as "Superdrag - Ambulance Driver" . Then it takes the two parts of the array an writes them to the ID3 v1 tag in the corresponding fields. But for some reason it's not working. Any help with this is extremely appreciated as the use of this program will save me MANY hours of work!
VB Code:
Private Sub Command1_Click()
lbltotal.Caption = File1.ListCount
For x = 0 To File1.ListCount - 1
lblcurrent = File1.ListIndex
Filename = Dir1.Path & "\" & File1.List(x)
arraystrings = Split(Filename, " - ")
tag = "TAG"
songname = arraystrings(1)
artist = arraystrings(0)
Open Filename For Binary Access Write As #1
Seek #1, FileLen(Filename) - 127
Put #1, , tag
Put #1, , songname
Put #1, , artist
Close #1
Next