Put command only works when manually started

Advertisement

Doleo
Guest

Put command only works when manually started

Hi,

I have trouble making winscp put command work with wildcards when set as a scheduled task in Windows.
When I execute the script manually it works when, but when I put it on a schedule winscp returns an error.

the script is as follows
option batch on
option confirm off
open connection
cd /directory
put *.zip 
close
exit

The error message is as follows:
. 2011-04-27 06:00:17.933 File: "*.zip"
* 2011-04-27 06:00:17.964 (EOSError) System Error. Code: 123.

* 2011-04-27 06:00:17.964 The filename, directory name, or volume label syntax is incorrect
. 2011-04-27 06:00:17.964 Asking user:
. 2011-04-27 06:00:17.964 File or folder '*.zip' does not exist. ("System Error. Code: 123.

. 2011-04-27 06:00:17.964 The filename, directory name, or volume label syntax is incorrect")
* 2011-04-27 06:00:17.980 (EScpSkipFile) File or folder '*.zip' does not exist.
* 2011-04-27 06:00:17.980 System Error. Code: 123.
* 2011-04-27 06:00:17.980 The filename, directory name, or volume label syntax is incorrect
. 2011-04-27 06:00:17.980 Script: Failed
> 2011-04-27 06:00:17.980 Script: close
. 2011-04-27 06:00:17.980 Closing connection.
. 2011-04-27 06:00:17.980 Sending special code: 12
. 2011-04-27 06:00:17.980 Sent EOF message

Is there something wrong with the code? Or can i try to alter to code to make it work somehow? Would save me a great deal of time

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,517
Location:
Prague, Czechia

Re: Put command only works when manually started

Your script uploads files from currect working directory. Have you actually set scheduler to run WinSCP from the directory you want to upload files from? Alternatively, try to use full path in the script.

Reply with quote

Advertisement

You can post new topics in this forum