Topic "WinSCP not running through Task Scheduler"

Author Message
Sakshi
[View user's profile]

Joined: 2017-07-11
Posts: 3
Location: DELHI,INDIA
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.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26462
Location: Prague, Czechia
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
[View user's profile]

Joined: 2017-07-11
Posts: 3
Location: DELHI,INDIA
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. Smile
Advertisements

You can post new topics in this forum






Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License