try playing with winamps media library
i havent tried it in the application that you wish to use it for, but i believe that it scans all the files and grabs the id3 tag from them. then it creates a database using that information, which (i think) would be exactly what youre wanting