Re: Works in GUI, does not work in code.
I need some help figuring out what I'm doing wrong. I can connect to a site through the gui using:
Protocol: sftp
hostname: sftp.getclever.com
port number: 22
user name: righteous-pass-8586
password: insert password here
private key file: blank
How can I recreate those settings in code?
https://winscp.net/eng/docs/scripting
https://winscp.net/eng/docs/scriptcommand_open
It will be something like:
winscp.exe /console /command "option batch abort" "open sftp://righteous-pass-8586:insertpasswordhere@getclever.com"
or
winscp.exe /console /script=example.txt
and in example.txt have something like:
# Automatically abort script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect using a password
open sftp://righteous-pass-8586:insertpasswordhere@getclever.com
Then insert your code to do something like "cd" to change directory or "lcd" to change local directory and "put" and "get"