Batch change of ID3 tags by VB Script in MP3 and other files.
ActiveX RegEdit.   ActiveX User account Manager   Pure-ASP Upload
Export MDB/DBF from ASP   Active LogFile   WebChecker   ActiveX/ASP Multi Dictionary object
 See 
 also 
 IISTracer, real-time IIS monitor and logging tool.
 Huge ASP file upload with progress bar. 



Do you like this article?
Please, rate it
and write review!
Rated:
by Aspin.com users
What do you think?
 Top messages
 22.3.2003 19:18:41 
 Read and write SQL image data, store binary file to sql table. (nbsp;WSHDatabaseConversionVBScript)
 4.5.2002 9:16:43 
 Send an email from ASP (WSH) using VBSscript, CDONTS and Outlook. (nbsp;ASP / ASP.NetWSHVBScriptEmail)
 12.6.2003 9:14:29 
 Download multiple files in one http request (nbsp;File & data transferVBScript)

 Batch change of ID3 tags by VB Script in MP3 and other files. 

 Areas>ASP / ASP.Net>Media>Sound
 Areas>Languages>VBScript
      Sometimes you will need to change ID3 tags in a batch process. This code is using CDDBControl.dll, which is suplied with Creative SoundBlaster extigy drivers and software.
      Next code let's you change some ID3 metadata in one mp3 file.
  Dim id3 'As New CddbID3Tag
  Set id3 = CreateObject("CDDBControl.CddbID3Tag")
  id3.LoadFromFile "Z:\Work\94.01.09 rozsivani a sklizeni.mp3", False
  id3.Album = "Život za život"
  id3.Title = "Boží rozsívání a sklizeň"
  id3.CopyrightHolder = "Fotobit, s.r.o."
  id3.CopyrightYear = "2005"
  id3.FileId = "Ab-33-00025"
  id3.Genre = "Speech"
  id3.ISRC = "Ab-33-00025"
  id3.LeadArtist = "Alexandr Flek"
  id3.PartOfSet = "1"
  id3.Year = "1994/01/09 10:00"
  id3.Comments = "Remaster kázání 1 "
  id3.SaveToFile "Z:\Work\94.01.09 rozsivani a sklizeni.mp3"
      Second code is a VBScript batch which let's you change Artist field in all music or other sound mp3 files in one folder.
'Batch change ID3 tag Author In folder files
'2005 Antonin Foller, Motobit Software
Sub ChangArtist(sFolder, Artist)
  
  'get FileSystemObject To enumerate files
  Dim FS: Set FS = CreateObject("Scripting.FileSystemObject")
  
  'Get id3 object To change data
  Dim id3: Set id3 = CreateObject("CDDBControl.CddbID3Tag")
  
  'Enumerate folder files
  Dim File
  For Each File In FS.GetFolder(sFolder).Files
    'Select only mp3 files In the folder
    If LCase(Right(File.Name, 4)) = ".mp3" Then
      'Load id3 data from the file
      id3.LoadFromFile File.Path, False
      
      'Change Artist In the id3 data
      id3.LeadArtist = Artist
      
      'Save modified id3 data To the file
      id3.SaveToFile File.Path
    End If
  Next
End Sub

Initialize CddbID3Tag in Net (ASP, VB.Net, C#)

1. Register the CDDBControl.dll file on your system (by regsvr32)
2. Go to menu Project -> Add reference -> Com tab -> Browse
Select CDDBControl.dll file, click Open and OK.
3. Use the object in your code. You can write (VB.Net):
'Create CddbID3Tag object
  Dim ID3 As New CDDBCONTROLLib.CddbID3Tag

'Load ID3 data from a file
  ID3.LoadFromFile("Z:\bozi rozsivani a sklizeni v r. 94.mp3", False)

'...

CDDBControl on web

Find more about CDDBControl.dll

Class CddbID3Tag

GUID: {D734EAE8-0810-4513-99B6-DDAC4BC30E29}
HelpString: CddbID3Tag Class
Interfaces:

Interface ICddbID3Tag

GUID: {0306D2A8-B7E2-4EA2-ADC6-78F80D65B1E2}
HelpString: ICddbID3Tag Interface
Members:
  • Sub QueryInterface(riid as GUID, ppvObj as Void)
  • Function AddRef as VT_UI4
  • Function Release as VT_UI4
  • Sub GetTypeInfoCount(pctinfo as VT_UINT)
  • Sub GetTypeInfo(itinfo as VT_UINT, lcid as VT_UI4, pptinfo as Void)
  • Sub GetIDsOfNames(riid as GUID, rgszNames as VT_I1, cNames as VT_UINT, lcid as VT_UI4, rgdispid as Long)
  • Sub Invoke(dispidMember as Long, riid as GUID, lcid as VT_UI4, wFlags as VT_UI2, pdispparams as DISPPARAMS, pvarResult as Variant, pexcepinfo as EXCEPINFO, puArgErr as VT_UINT)
  • Property Get Album as String [property Album]
  • Property Put Album as String [property Album]
  • Property Get Movie as String [property Movie]
  • Property Put Movie as String [property Movie]
  • Property Get Title as String [property Title]
  • Property Put Title as String [property Title]
  • Property Get CopyrightYear as String [property CopyrightYear]
  • Property Put CopyrightYear as String [property CopyrightYear]
  • Property Get CopyrightHolder as String [property CopyrightHolder]
  • Property Put CopyrightHolder as String [property CopyrightHolder]
  • Property Get Comments as String [property Comments]
  • Property Put Comments as String [property Comments]
  • Property Get Label as String [property Label]
  • Property Put Label as String [property Label]
  • Property Get BeatsPerMinute as String [property BeatsPerMinute]
  • Property Put BeatsPerMinute as String [property BeatsPerMinute]
  • Property Get LeadArtist as String [property LeadArtist]
  • Property Put LeadArtist as String [property LeadArtist]
  • Property Get PartOfSet as String [property PartOfSet]
  • Property Put PartOfSet as String [property PartOfSet]
  • Property Get TrackPosition as String [property TrackPosition]
  • Property Put TrackPosition as String [property TrackPosition]
  • Property Get Year as String [property Year]
  • Property Put Year as String [property Year]
  • Property Get Genre as String [property Genre]
  • Property Put Genre as String [property Genre]
  • Property Get FileId as String [property FileId]
  • Property Put FileId as String [property FileId]
  • Property Get ISRC as String [property ISRC]
  • Property Put ISRC as String [property ISRC]
  • Sub LoadFromFile(Filename as String, Readonly as Long) [method LoadFromFile]
  • Sub BindToFile(Filename as String, Readonly as Long) [method BindToFile]
  • Sub SaveToFile(Filename as String) [method SaveToFile]
  • Sub Commit [method Commit]
  • Sub Clear [method Clear]
  • Sub LoadFromBuffer(Buffer as Variant, BufferSize as Long) [method LoadFromBuffer]
  • Function GetBufferSize as Long [method GetBufferSize]
  • Sub SaveToBuffer(Buffer as Variant, BufferSize as Long) [method SaveToBuffer]
  • Function GetTextFrame(Frame as String) as String [method GetTextFrame]
  • Sub SetTextFrame(Frame as String, Text as String) [method SetTextFrame]
  •  
     

    See also for 'Batch change of ID3 tags by VB Script in MP3 and other files.' article:

         List ID3 metadata tags from mp3 or wma files using VB Script Let's you list all your media files and collect metadata tags from the files.

    If you like this page, please include next link on your pages:
    <A
     Href="http://www.motobit.com/tips/detpg_change-id3-tags-script/"
     Title="Let's you read and replace ID3
      tags in meadia files (mp3)
      with VB Script batch in
      ASP, WSH or ASP.Net."
    >Batch change of ID3 tags by VB Script in MP3 and other files.</A>

         IISTracer - IIS ISAPI real-time monitor IISTracer is a real-time monitoring tool for Microsoft IIS, which will show/log you what is happenning on IIS server right now. It let's you reveal problems with long-running scripts (.asp, .cgi, cfm...), hang-up states and low resource situations and lets you stop long-running requests (uploads/downloads).      ActiveX User account Manager - Set of simple objects for creating, deleting, and managing user accounts, groups, servers and domains in the Windows NT environment.
         Active log file - Hi-performance text file logging for ASP/VBS/VBA applications. Lets you create daily/weekly/monthly log files with variable number of logged values and extra timing and performance info.      ActiveX windows registry editor - Intuitive, easy to use COM interface to windows registry. Set of classes to read/enumerate/modify windows registry keys and values from ASP, VBS and T-SQL.
         ActiveX/ASP Multi Dictionary object - Free-threaded hi-speed dictionary algorithm with unique/nonunique keys (map/multimap). Connect to another dictionary object in the same process. Lock and Unlock methods to synchronize tasks (application scope). Share ASP Application/Session objects.      Export DBF/MDB from ASP - Conversion from recordset to MDB/DBF. Direct binary output of MDB or DBF files from ASP pages with one row of code.
         Pure-ASP upload - lets you upload files using Pure ASP VBS code (using multipart/form-data and input type=file).      ByteArray - Works with safearray binary data (VT_UI1 | VT_ARRAY) - save/restore binary data from disk, find, work with code pages, convert to string/hexstring(SQL).
         WebChecker - Checks http, https, ftp and gopher internet connections in regular intervals. Lets you monitor web site functionality (uptime). Enables restart or notification on problems.      HTTPLog ISAPI filter - Lets you log incomming/outgoing http header and document data to separate files. Monitor of IIS service input/output.

    © 1996 – 2010 Antonin Foller, PSTRUH Software, e-mail help@pstruh.cz