And does the generated script work?
Note that the generated script puts the password into session URL, where many symbols need to be encoded:
https://winscp.net/eng/docs/session_url#special
In your original script you had the password in
Note that the generated script puts the password into session URL, where many symbols need to be encoded:
https://winscp.net/eng/docs/session_url#special
In your original script you had the password in
-password switch, where encoding/escaping is not needed. Except for the double quote.