Wanted to sort by filename with "Set SORTBY=name" "- filename" and "-file name" but nothing happens. It seems so obviosly and easy that nobody mention it. In the end I found that it is nessesary to add "SORTREVERSE=Off" I hope this saves someone some time because it is not listed in the manual.
Set SORTBY=name
on its own works fine, in terms of making Name the column that you're sorting by.
You only need to specify SORTREVERSE=off
if you're reverse-sorting and want to turn that off at the same time.