1

I have been trying to run a task scheduler named "Backup" that downloads the specified file from the FTP server to my local directory.

When I executed the command manually from the winscp console it worked but did not work in task scheduler. I have no errors shown but it gives a 0x1 code and in the history says

Task Scheduler successfully finished "{152e054b-1562-4544-af06-d6c75f9e97b1}" instance of the "\Backup" task for user "domain\user".

The script action was:

Program/script: C:\Users\ID\WinSCP\WinSCP.exe 

Add arguments (optional): /command "winscp /script =C:\myScripts\testScript.txt"

1 Answer 1

0

The command-line arguments that you have specified do not make any sense.

It looks like you are trying instruct WinSCP to run WinSCP. That cannot work.

Use only this:

/script=C:\myScripts\testScript.txt

I.e. this is an equivalent to specifying the following full command on Windows command-line (you should test this before trying it from scheduler):

C:\Users\ID\WinSCP\WinSCP.exe /script=C:\myScripts\testScript.txt

See WinSCP command-line documentation.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .