Here's an idea: Use an XSLT parser that can output mutilple files. I assumed that m3u playlists are just lists of filenames.
1: Make an empty folder to store everything in.
2: Install (and start, using the plug-in manager) scott_r's XML export plug-in (see
http://yabb.jriver.com/interact/index.php?board=5;action=display;threadid=16536).
3: Make a playlist containing any files that have these special comment fields (perhaps just your whole library).
4: Export this playlist using the plug-in. To do this, look under the "Plug-ins" node at the bottom of the tree. Select "MCXMLExport". Select the playlist you prepared, and make sure only the fields "Comment" and "Filename" are selected under "Select Database Fields". Deselect any checkmark buttons on the right. Press Export, and save the resulting file as "export.xml" in the empty folder you prepared.
5: Download Instant Saxon from
http://prdownloads.sourceforge.net/saxon/instant_saxon6_5_3.zip. Unzip the exe file to your previously-empty folder.
6: Copy the following code into Notepad and save the file as "style.xsl". Make sure that you don't save it with a ".txt" extension.
<?xml version="1.0"?>
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:key name="comments" match="Field[@Name='Comment']" use="text()" />
<xsl:template match="MPL">
<xsl:apply-templates select="*/Field[generate-id(.)=generate-id(key('comments', text()))]" />
</xsl:template>
<xsl:template match="Field[@Name='Comment']">
<xsl:variable name="comment"><xsl:value-of select="text()"/></xsl:variable>
<xsl:document href="{text()}.m3u" method="text">
<xsl:for-each select="/*//Field[@Name='Filename' and ../Field[@Name='Comment' and text()=$comment]]">
<xsl:value-of select="text()"/><xsl:text>
</xsl:text>
</xsl:for-each>
</xsl:document>
</xsl:template>
</xsl:stylesheet>
6: Enter the MS-DOS command prompt. Navigate to your previously-empty directory. Execute "saxon export.xml style.xsl".
You should have a collection of properly named m3u files (in the folder, of course). I should note that this code is rather delicate though. If the input file is anything but an MCXMLExport-generated XML file with only Comment and Filename exported, it's quite prone to error. Also, I've assumed that the comments have no uglieness (strange symbols or spaces, etc.). Numbers should work fine. Try it.
Hope this helps, and I'd be happy to help if there are any issues!
Joshua