A frequently asked question when it comes to burning Mp3
CDs, is "How can I get my Mp3 CD to begin playing automatically after I
insert it into my CD-Rom drive"?
The answer is quite simple but, for some reason, not as widely known as it
should be. Basically, all you need to do is create a m3u playlist and then set
it to autorun on your CD. In this article, I will demonstrate a 3 step bat file
method which requires no third party utilities and works on all Windows systems
using whatever your default media player is for your Mp3 playlists.
Before beginning, make a point to do all your work in the same folder containing
the mp3 files you plan to burn.
Creating your playlist
You can either create a playlist from scratch or have your player create one
and then edit it, as required.
The latter is the easiest way, but for your knowledge, I will first show how
to create one yourself.
Open up notepad and enter this as the first line:
(This line begins all playlists and is just there as a descriptor of the format—which
Then directly under it (or you can leave a space if desired—doesn't matter)
enter a list of the mp3 tunes you will burn on your CD in the following format.
(This requires some explanation, so first look at this sample and then I will
#EXTINF: Really Don't Know.mp3
01—Really Don't Know.MP3
#EXTINF: Ordinary People.mp3
#EXTINF:Not Supposed To Break Down.MP3
04—Not Supposed To Break Down.MP3
#EXTINF: Contemplation Rose.MP3
You will notice the Mp3 tunes are listed twice in each entry.
The first entry—the one after #EXTINF:—is the actual song name, not necessarily
the file name. The song name is the name that is embedded in the Mp3—in the
ID3 tag. If the Mp3 has no ID3 tag naming the tune, then the
file name will be used by default, without the Mp3 extension. The second entry
of the song on the second line is the actual file name. Make sure, for all your
entries, to enter only the file name, without including the actual path to it.
If you were to simply list your Mp3 file names without the #EXTINF:
actual song name line, then the player would only play the tunes that
have a song name entered in the ID3 tag, and the rest would be skipped.
By the same token, you can just enter file names—yes, it can be that simple;
but always test out the file first to make sure it works by simply double clicking
it to begin play.
Once you finish listing the songs, save the file with a m3u
extension. In this demo, we will call it play.m3u.
Now for the easier way which is to create a m3u play list using your media
player, and then open it with a text editor to edit it. The only editing you
will have to do is remove the paths to the song names.
You may also notice that when your player generates a playlist, the entries
might look a little different, i.e.,:
#EXTINF:289,From A Distance.mp3
D:\Audio Work\Nanci Griffith\FromADistance.mp3
The number after the colon (:289) indicates the length of the song in seconds.
So, in the above example, 289 translates to 4 minutes and 49 seconds. You would
just leave it as is. As I said, all you have to do is remove the paths, so in
the above example, the final result would look like this:
#EXTINF:489,From A Distance.mp3
Using a text editor with a Find>Replace option makes it
a snap to remove the paths if all the Mp3s are in the same location. Just enter
the path section to remove and replace with an empty string.
Ok, you now have your play.m3u file. Now test it by double
clicking it. Your media player should begin playing the tunes in your playlist.
Now we will create bat file to execute your playlist.
Open up Window's own Notepad or any text editor. Enter the following 3 lines:
Save with a .bat extension. For this demo, we will call it
If you made this in Windows 2k or XP, your bat file is now
If you made it in Windows 95/98/ME, you want to be sure the path of the the
bat file is removed from the command line field.
Right click the bat file, go to Properties, click the Program
tab, and in the Command line field, remove the path name so
that just the file name remains, i.e., if the entry is C:\Windows\Desktop\PlayIt.bat,
make it so it states only PlayIt.bat.
Also delete anything that is listed in the working field.
With Windows 9x, you also have the advantage of running the file minimized
(with XP, you see the DOS box flash) To do so, right click the bat file, go
to Properties, and choose Run Mimimized and
also make sure Close On Exit is chosen. Save your changes.
Doing the above will result in the automatic creation of a shortcut (pif file)
in the same directory your bat file is in. You will need this shortcut so do
not delete it.
Now test the bat file by double clicking it. Your media player should begin
playing your playlist tunes. (In Windows XP, you will notice a flash of the
DOS window but in the Windows 9x with the 9x bat file there will be no such
flash since we set the file to run mimimized.)
Creating an AUTORUN.inf
This is the easiset step. This is the file that will start the bat file
to begin the auto play of your Mp3 CD.
Open up Notepad or any text editor and enter the following:
Save as AUTORUN.inf
Now it's just a matter of burning the files you created, along with the Mp3's,
to a DATA CD.
If this was done in Windows 9x, you should have 4 files:
PlayIt (Dos shortcut)
If you did this in Windows 2000/XP, you should have 3 files:
Note! If you are using Windows 2000, ME
or XP, and you plan to play your CD only on those systems, you can skip the
bat file and execute your playlist directly via your autorun file using the
shellexecute command as follows:
Also, if you are a Visual Basic dabbler, you can compile a simple exe (instead
of a bat file) to call the playlist. Just use the Shell or ShellExecute function
to start play.m3u.
For more multimedia info, you may want to check out the
few other articles I have written for ABC on audio and video matters.