mIRC's /write command is most likely the equivilent of this:

Code:
alias write {
  .fopen <name> <file>
  .fwrite -n <name> <data>
  .fclose <name>
}


Speaking of file handling, this would probably be the fastest method in this case:

Code:
alias create.playlist.mp3 {
  if (!$fopen(playlist)) {
    .fopen -n playlist Remotes\Mp3.txt
    if ($fopen(playlist)) {
      .echo -q $findfile(%mp3dir,*.mp3,0,.fwrite -n playlist $remove($1-,%mp3dir))
      .fclose playlist
    }
  }
}


New username: hixxy