Sub jecc()
Dim x00, sp, sq, ar, j As Long, i As Long
x00 = "C:\Users\xxx\Music\*.mp3"
sp = Split(CreateObject("wscript.shell").exec("cmd /c Dir """ & x00 & """ /b/o:n").stdout.readall, vbCrLf)
sq = Array(0, 15, 16, 27, 20, 1, 3, 2, 28) 'These numbers should be in line with the array in the second-last line.
ReDim ar(UBound(sp), UBound(sq))
For i = 0 To UBound(sp) - 1
With CreateObject("shell.application").Namespace(CStr(Split(x00, "*")(0)))
For j = 0 To UBound(sq)
ar(i, j) = .getdetailsof(.Items.Item(CStr(sp(i))), sq(j))
Next
End With
Next
Cells(1, 1).Resize(, UBound(ar, 2) + 1) = Array("Name", "Year", "Genre", "Time", "Albumartist", "Size", "Changed on", "Type", "Bitrate")
Cells(2, 1).Resize(UBound(sp), UBound(ar, 2) + 1) = ar
End Sub