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

cResults

Re: SFTP Batch authenticating but not performing actions

Thank you for correcting my syntactical error. Everything is working as you designed it to work.

Grateful
martin

Re: SFTP Batch authenticating but not performing actions

C:\Program Files\WinSCP\WinSCP.exe /console /command "option echo on" "option batch abort" "option confirm off" "open sftp://USERNAME:password@server.com:1234 -hostkey=""ssh-dss 1234 65:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx""" "ls " "cd /DropOff " "put c:\uploadfile.txt" "exit"

Note the quotes around -hostkey switch.
cResults

SFTP Batch authenticating but not performing actions

C:\Program Files\WinSCP\WinSCP.exe /console /command "option echo on" "option batch abort" "option confirm off" "open sftp://USERNAME:password@server.com:1234" -hostkey="ssh-dss 1234 65:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx" "ls " "cd /DropOff " "put c:\uploadfile.txt" "exit"

The process successfully creates a session, but it doesn't execute the ls, cd, put or exit. The console stays upon with the session active. I am able to then manually enter the ls, cd, put and exit commands manually and the file transfers.

Is there something that I need to do to make the actions execute automatically.

I've spent a number of hours on winscp.net and I can not seem to figure out what I'm doing wrong.

All ideas are greatly appreciated.