Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

bananapun

re

Ah ok I get the problem now
WinSCP.com /ini=nul /command 'open -hostkey=acceptnew -password=password sftp://username@ipaddress' 'get /home/username/Windows_resource/md5.txt' 'exit'

Need to add quotation.
bananapun

re: Command line return nothing but host

Not sure what is the issue here. So I think I will stick with the the scripting method and invoke the script from the command line instead. Should be ok.
bananapun

Command line return nothing but host

Hi. I am using the command line options. something like this
WinSCP.com /ini=nul /command open -hostkey=acceptnew -password=password sftp://username@ipaddress get /home/username/Windows_resource/md5.txt exit

Executing above command returns searching for host, refer below

Opening session using command-line parameter in scripting is deprecated. Use 'open' command instead.
Searching for host...
Connecting to host...
Authenticating...
Using username "username".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Session started.
Active session: [1] username@ipaddress
Host:
Host:
Host:
Host:
Host:
Host:
Host:
Host:
Host:
Host:
Host:
Host:
Host:
Host:
Host:
Host:
Host:
Host:
Host:
Host:
Host:

Is my syntax wrong?