Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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

Sakshi

Re: WinSCP not running through Task Scheduler

martin wrote:

This is not a script, it's a sequence of inputs.

You have to store the WinSCP commands to a script file and tell WinSCP to execute it using /script=C:\path\to\script.txt command-line switch.

See https://winscp.net/eng/docs/guide_automation


Hi Martin,
Thanks for your reply. Earlier also,the commands were saved to script file only and it worked. The only difference was WinSCP was executed in the same script file.
Now, we have separated the script and have used batch file that executes WinSCP.

Thanks for the solution. :)
martin

Re: WinSCP not running through Task Scheduler

This is not a script, it's a sequence of inputs.

You have to store the WinSCP commands to a script file and tell WinSCP to execute it using /script=C:\path\to\script.txt command-line switch.

See https://winscp.net/eng/docs/guide_automation
Sakshi

WinSCP not running through Task Scheduler

Below script when run manually on cmd works successfully:
D:\Software\WinSCP-5.9.5-Portable\WinSCP.com /log=D:\WinSCPLog\winscp.log
open sftp://@abc.com -hostkey="ssh-rsa 2048 c2:82:7e:88:3f:ee:2b:3e:d0:04:cf:4f:3f:8c:17:d4"
Username
Password
lcd "BANKINTERFACE"
cd XYZ
put -nopermissions -nopreservetime DDS*.txt

When this script is run through batch file that is scheduled Task Scheduler it is not transferring.