Env vars used here, as set by batch before calling script:
set WINSCP="C:\Program Files (x86)\WinSCP\WinSCP.exe"
set TEMP=%SystemDrive%\Temp\     ("c:\temp\")
set SCP=%~dpn0                   ("s:\kel\syncad")
set SCPBAS=%~n0                  ("syncad")
set SCPSCR=%SCP%.txt             ("syncad.txt")
set SCPLOG=%TEMP%%SCPBAS%.log    ("c:\temp\syncad.log")

Commands in script:

open sftp://lewiske:pass@10.128.90.20:3389/ -rawsettings Tunnel=1 TunnelHostName="172.26.170.21" TunnelUserName="kris.ctr.lewis" TunnelPasswordPlain="pass" 
cd /users/scripts 
call ./adpt_upd nowait 
cd /users/tmpadapt 
get adapt.zip %TEMP% 
close 
exit 


Run from batch: %WINSCP% /log=%SCPLOG% /ini=nul /script=%SCPSCR%

. 2020-09-26 09:19:23.753 --------------------------------------------------------------------------
. 2020-09-26 09:19:23.754 WinSCP Version 5.13.7 (Build 9125) (OS 10.0.18363 - Windows 10 Enterprise)
. 2020-09-26 09:19:23.754 Configuration: nul
. 2020-09-26 09:19:23.754 Log level: Normal
. 2020-09-26 09:19:23.754 Local account: FAA\Kris CTR Lewis
. 2020-09-26 09:19:23.754 Working directory: S:\KEL
. 2020-09-26 09:19:23.754 Process ID: 11092
. 2020-09-26 09:19:23.754 Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe"  /log=C:\Temp\SyncAD.log /ini=nul /script=S:\KEL\SyncAD.txt
. 2020-09-26 09:19:23.754 Time zone: Current: GMT-4, Standard: GMT-5 (Eastern Standard Time), DST: GMT-4 (Eastern Daylight Time), DST Start: 3/8/2020, DST End: 11/1/2020
. 2020-09-26 09:19:23.755 Login time: Saturday, September 26, 2020 9:19:23 AM
. 2020-09-26 09:19:23.755 --------------------------------------------------------------------------
. 2020-09-26 09:19:23.755 Script: Retrospectively logging previous script records:
> 2020-09-26 09:19:23.755 Script: open sftp://lewiske:***@10.128.90.20:3389/ -rawsettings Tunnel=1 TunnelHostName="172.26.170.21" TunnelUserName="kris.ctr.lewis" TunnelPasswordPlain=***
. 2020-09-26 09:19:23.755 --------------------------------------------------------------------------
. 2020-09-26 09:19:23.755 Session name: lewiske@10.128.90.20 (Ad-Hoc site)
. 2020-09-26 09:19:23.755 Host name: 10.128.90.20 (Port: 3389)
. 2020-09-26 09:19:23.755 User name: lewiske (Password: Yes, Key file: No, Passphrase: No)
. 2020-09-26 09:19:23.755 Tunnel: Yes
. 2020-09-26 09:19:23.755 Tunnel: Host name: 172.26.170.21 (Port: 22)
. 2020-09-26 09:19:23.755 Tunnel: User name: kris.ctr.lewis (Password: Yes, Key file: No)
. 2020-09-26 09:19:23.755 Tunnel: Local port number: 0
. 2020-09-26 09:19:23.755 Transfer Protocol: SFTP
. 2020-09-26 09:19:23.755 Ping type: Off, Ping interval: 30 sec; Timeout: 15 sec
. 2020-09-26 09:19:23.755 Disable Nagle: No
. 2020-09-26 09:19:23.755 Proxy: None
. 2020-09-26 09:19:23.755 Send buffer: 262144
. 2020-09-26 09:19:23.755 SSH protocol version: 2; Compression: No
. 2020-09-26 09:19:23.755 Bypass authentication: No
. 2020-09-26 09:19:23.755 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: Yes
. 2020-09-26 09:19:23.755 GSSAPI: Forwarding: No; Libs: gssapi32,sspi,custom; Custom: 
. 2020-09-26 09:19:23.755 Ciphers: aes,chacha20,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2020-09-26 09:19:23.755 KEX: ecdh,dh-gex-sha1,dh-group14-sha1,rsa,WARN,dh-group1-sha1
. 2020-09-26 09:19:23.755 SSH Bugs: Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto
. 2020-09-26 09:19:23.755 Simple channel: Yes
. 2020-09-26 09:19:23.755 Return code variable: Autodetect; Lookup user groups: Auto
. 2020-09-26 09:19:23.755 Shell: default
. 2020-09-26 09:19:23.755 EOL: LF, UTF: Auto
. 2020-09-26 09:19:23.755 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes; Follow directory symlinks: No
. 2020-09-26 09:19:23.756 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2020-09-26 09:19:23.756 SFTP Bugs: Auto,Auto
. 2020-09-26 09:19:23.756 SFTP Server: default
. 2020-09-26 09:19:23.756 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2020-09-26 09:19:23.756 Cache directory changes: Yes, Permanent: Yes
. 2020-09-26 09:19:23.756 Recycle bin: Delete to: No, Overwritten to: No, Bin path: 
. 2020-09-26 09:19:23.756 DST mode: Unix
. 2020-09-26 09:19:23.756 --------------------------------------------------------------------------
. 2020-09-26 09:19:23.756 Opening tunnel.
. 2020-09-26 09:19:23.757 Autoselected tunnel local port number 50000
. 2020-09-26 09:19:23.757 [Tunnel] Looking up host "172.26.170.21" for SSH connection
. 2020-09-26 09:19:23.757 [Tunnel] Connecting to 172.26.170.21 port 22
. 2020-09-26 09:19:23.779 [Tunnel] We claim version: SSH-2.0-WinSCP_release_5.13.7
. 2020-09-26 09:19:23.873 [Tunnel] Server version: SSH-2.0-OpenSSH_7.4
. 2020-09-26 09:19:23.873 [Tunnel] Using SSH protocol version 2
. 2020-09-26 09:19:23.897 [Tunnel] Doing ECDH key exchange with curve nistp256 and hash SHA-256
. 2020-09-26 09:19:23.959 [Tunnel] Server also has ssh-rsa host key, but we don't know it
. 2020-09-26 09:19:23.960 [Tunnel] Host key fingerprint is:
. 2020-09-26 09:19:23.960 [Tunnel] ecdsa-sha2-nistp256 256 f6:1a:2a:b0:a2:3d:14:31:eb:92:39:fb:f5:a5:61:50 KmlymX4521gtpAaOhSrz4UY9CAEO+JNiAFTCQ/XqbUM=
. 2020-09-26 09:19:23.960 [Tunnel] Closing connection.
. 2020-09-26 09:19:23.960 [Tunnel] Sending special code: 12


