BTW, I'm not doing this into a dialog; I'm putting it into the custom window in the first place.
Anyways, the /loadbuf worked wonders with the main box, allowing me to get rid of the $read loop to fill the playlist into it with. However, using -S to alphabetize the sidebox didn't help much, because now the folders are alphabetized along with the files, with no difference. I sort of wanted the folders alphabetized on top and the files right beneath that, like Windows standard.