读取MP3,WMA音频文件的ID3部分获取(还可以读取视频文件的分辨率)、
前段时间在网上找了许久,想用 来修改手上的20多万的歌曲数据但是都没找到想要的答案~!
还好 啊D写的 CLS_ID 让我找到了Shell.Application这个组建,接着顺藤摸瓜!
现在我就把代码放出来,如果对你有需要,只要修改下就可以扩张了!

貌似读取ID3只能在 win2003 SP1下才有效!
<%
‘On Error Resume Next
arrFile = MyGetFile("G:\Cy_UTF-8\ys.mp3")    
Set oShell = CreateObject("Shell.Application")    ‘定义组建名
Set oDir = oShell.NameSpace(arrFile(1) + "\")
Set oFile = oDir.ParseName(arrFile(0))

‘ Response.Write "<BR>"&oDir.GetDetailsOf(,21)&vbTab&"<BR><BR>"
‘ Response.Write "<BR>"&oDir.GetDetailsOf(oFile,21)&"<BR><BR>"
p=0
For i = 0 To 400
p=p+1
    sTmp =p & oDir.GetDetailsOf(,i) + vbTab  
    info=oDir.GetDetailsOf(oFile,i)
    If sTmp = vbTab Then Exit For
    if info<>"" then sPrint = sPrint + vbCrLf + "<br>" + sTmp + info

Next

Response.Write sPrint

Set oFile = Nothing
Set oDir = Nothing
Set oShell = Nothing

‘****************************************
‘获得要操作的文件,返回一个包含文件名和路径的数组(FileName/FilePath)
‘*****************************************
Function MyGetFile(Strfile)
On Error Resume Next
Dim objFso,objFile
Set objFso = CreateObject("Scripting.FileSystemObject")
Set objFile = objFso.GetFile(strFile)
MyGetFile = Array(objFile.Name,objFile.ParentFolder)
Set objFile = Nothing
Set objFso = Nothing
End Function

%>

下面是修改ID3的代码,调用了wmp组建(WMPlayer.OCX)~

 
<%
‘ID3修改代码

Dim iFilename,iMusicName,iMusicPtr,iSinGerName,iSpecialName,iSpecialTime,istrInfo

iFilename = "G:\Cy_UTF-8\ys.mp3"
iMusicName = "夜曲"
iMusicPtr = "a306.com"
iSinGerName = "周杰伦"
iSpecialName = "十一月的萧邦"
iSpecialTime = Now()
istrInfo = "
http://Sky.la"

Call SetWmaTag(iFilename,iMusicName,iMusicPtr,iSinGerName,iSpecialName,iSpecialTime,istrInfo)

‘修改wma标签

Sub SetWmaTag(Filename,MusicName,MusicPtr,SinGerName,SpecialName,SpecialTime,strInfo)
    On Error GoTo 0
    Dim Player1
    Set Player1= Server.CreateObject("WMPlayer.OCX")
    ‘Set Player1 = CreateObject("WMPlayer.OCX.7")
    Player1.settings.autoStart = False
    Player1.settings.mute = True
    Player1.Url = Filename
    Player1.Controls.stop
    
    Player1.currentMedia.setItemInfo "Title",MusicName
    Player1.currentMedia.setItemInfo "Artist",SinGerName
    Player1.currentMedia.setItemInfo "Album",SpecialName
    Player1.currentMedia.setItemInfo "Writer",strInfo
    Player1.currentMedia.setItemInfo "Composer",strInfo
    Player1.currentMedia.setItemInfo "Lyrics",strInfo
    Player1.currentMedia.setItemInfo "Description",strInfo
    Player1.currentMedia.setItemInfo "WM/WMADRCPeakReference",strInfo
    Player1.currentMedia.setItemInfo "WM/WMADRCAverageReference",strInfo
    Player1.currentMedia.setItemInfo "WM/Year",SpecialTime
    ‘Player1.currentMedia.setItemInfo "WM/PromotionURL",strInfo
    Player1.currentMedia.setItemInfo "WM/Track",strInfo
    ‘Player1.currentMedia.setItemInfo "WM/AlbumCoverURL",strInfo
    Player1.currentMedia.setItemInfo "WM/Publisher",strInfo
    Player1.currentMedia.setItemInfo "WM/Publisher",strInfo
    Player1.currentMedia.setItemInfo "WM/ContentGroupDescription",strInfo
    Player1.currentMedia.setItemInfo "WM/SubTitle",strInfo
    Player1.currentMedia.setItemInfo "WM/AlbumTitle",SpecialName
    Player1.currentMedia.setItemInfo "WM/OriginalAlbumTitle",strInfo
    Player1.currentMedia.setItemInfo "WM/Genre",strInfo
    Player1.currentMedia.setItemInfo "WM/Mood",strInfo
    Player1.currentMedia.setItemInfo "WM/TrackNumber",MusicPtr
    Player1.currentMedia.setItemInfo "WM/PartOfSet",SinGerName
    Player1.currentMedia.setItemInfo "WM/AlbumArtist",strInfo
    Player1.currentMedia.setItemInfo "WM/Conductor",strInfo
    Player1.currentMedia.setItemInfo "WM/OriginalArtist",strInfo
    Player1.currentMedia.setItemInfo "WM/Writer",strInfo
    Player1.currentMedia.setItemInfo "WM/OriginalLyricist",strInfo
    Player1.currentMedia.setItemInfo "WM/Composer",strInfo
    Player1.currentMedia.setItemInfo "WM/Lyrics",strInfo
    Set Player1 = Nothing
End Sub

%>