Great, thanks so much! …bonus points for correctly handling Unicode!
The way Windows Media Player handles ripping files from a CD is still a bit smoother since it automatically makes a folder with the artist's name, and inside it actually numbers the songs so they are not sorted alphabetically after ripping but maintain the order they were in on the original CD (this can be customized to some extent, probably the only thing WMP does better than XMPlay I guess). Ideally the ripped files would just inherit the name just as it is in the playlist.
Admittedly this can be partially fixed by sorting the ripped files by date (they were ripped from top to bottom so timestamps are indicative of the order on the original CD) and running a batch rename that numbers them, so all's good. Not sure I'm explaining myself well here

Anyway I'm super happy, it all works! Thank you!