The dialog linked in your post also doesn't have a Generate Code option. It does have a button to open the Transfer Settings dialog, which is the one I noted that also doesn't have such an option.
See attached screenshot below.
In the Commander view, go to "Session" > "Generate Session URL code" > "Script" tab , then select the type of template you're after (script, batch, command line). You will just need to edit in the specific commands you wish to execute (as illustrated in the template by "Your command 1" and "Your command 2") which are well documented to be able to create by hand without the convenience of recording them from an actual UI action.
That path is clearly documented as well:
To open the dialog to generate the session URL or code, use:
- Session > Generate Session URL/Code command on the main window to generate session URL or code template for the current session. (preferred)
At the very beginning of the article: