Understandable confusion! That command is specifically for when the file display is "grouped", and controls whether the group that contains folders appears before all other groups or not.
The command you probably want is Set SORTORDER, which controls the mixing of files and folders (files on top, folders on top, or files and folders mixed together).
It's not a straight "toggle" though since it has three states - you can use Set SORTORDER=Cycle to cycle through the different modes. If you want a command to toggle between two modes you can use something like this (which will switch between "folders first" and "mixed"):
@toggle:if SORTORDER=folders
@ifset:SORTORDER=folders
Set SORTORDER=mixed
@ifset:else
Set SORTORDER=folders
I'm many years late this thread. i was just trying to figure how to make mixing files and folders toggle. I've copied that @toggle:if code to a button and put a hotkey to it. but it doesn't seem to be working...
has the maybe the context changed because were on v13 now?
That command was supposed to be on separate lines, changes to the forum sometime in the past 7 years broke it unfortunately. I've edited the post to fix it up.
I'm endlessly amazing at the power of Dopus. Wish i understood scripting commands better. little by little i guess. making my own menus via forum such as this.