Re: Use the Script tab to generate a WinSCP script template for the session or the file transfer.
See https://winscp.net/eng/docs/ui_generateurl (or https://winscp.net/eng/docs/guide_automation#generating):
To open the dialog to generate a file transfer code, use:
- Transfer Settings > Generate Code command on the Transfer Options dialog.