Reading MP3 ID3 Tags in WSH
(Page 1 of 4 )
ID3 is a popular audio file data tagging format used to store information about a sound file. The MP3 file format uses ID3 tags to store title, artist, and other track information. Unfortunately, WSH doesn’t provide a way to read ID3 tags without the help of third-party components, but today I’m going to show you a native workaround that will allow you to retrieve this valuable information.
ID3 tags are support by common software programs such as Windows Media Player, iTunes, MusicMatch, and common hardware such as iPod, Creative Zen, and Sony Walkman.
Windows does contain internal functionality for reading and writing ID3 tags, however there is no scripting interface for accessing this functionality through WSH. But that doesn’t suggest that it isn’t possible. As a scripter you sometimes have to think outside of the box.
In the Windows environment, ID3 tags are most evident in Windows Explorer when browsing a folder containing music files. If you use Detail View (by selecting Details from the View menu) you will see a series of columns appear. Many of these columns match the various ID3 tags and this is the information that they display.
While we may not be able to access ID3 tags directly, the Shell object does allow us to read the values of these columns. Distinguishing between them now becomes the trick—and it just wouldn’t be Windows if there wasn’t some incompatibility across platforms. As you will see, these columns are identified by number. Microsoft further aids our efforts by leaving these column IDs undocumented.
But before we get too involved, let’s take a look at these columns and how to read their values.
Next: Retrieving file details in WSH >>
More Windows Scripting Articles
More By Nilpo