English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

1 answers

I've got a VB script that'll export the library into an Excel spreadsheet here:

http://fixmypcmike.com/wmplist.vbs

When the security bar comes up you should download and save it so you can review the contents -- don't just run a VB script from someone you don't know! The file can be viewed and edited in Notepad or any text editor and looks like this (a few of the lines here are truncated):

==============BEGIN=============
Set objPlayer = CreateObject("WMPlayer.OCX" )

Set objMediaCollection = objPlayer.MediaCollection
Set colSongList = objMediaCollection.getByAttribute("MediaType", "Audio")

Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
Set objWorkbook = objExcel.Workbooks.Add()
Set objWorksheet = objWorkbook.Worksheets(1)

objWorksheet.Cells(1,1) = "Song"
objWorksheet.Cells(1,2) = "Artist"
objWorksheet.Cells(1,3) = "Album"
objWorksheet.Cells(1,4) = "Length"
objWorksheet.Cells(1,5) = "Times Played"

j = 2

For i = 0 to colSongList.Count - 1
Set objSong = colSongList.Item(i)
objWorksheet.Cells(j,1) = objSong.Name
objWorksheet.Cells(j,2) = objSong.getItemInfo("WM/AlbumArtist")
objWorksheet.Cells(j,3) = objSong.getItemInfo("Album")
objWorksheet.Cells(j,4) = objSong.durationString
objWorksheet.Cells(j,5) = objSong.getItemInfo("UserPlayCount")
j = j + 1
Next

Set objRange = objWorksheet.UsedRange
objRange.Columns.AutoFit()
===========END==================

2007-03-24 09:38:05 · answer #1 · answered by Fix My PC Mike 5 · 0 0

fedest.com, questions and answers