Thanks for sharing this. I was recently pondering writing something like that for my mp3 player and you just saved me a bunch of time. :)
Some ideas on how this could be improved: Possibility to exclude files above a certain size. Possibility to have it ignore files with certain strings in their names. I'll be adding those for myself anyhow, but figured you might want to know about them to update yours if you like.