Topic "Put command only works when manually started"

Author Message
Doleo

Guest


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
Code:
option batch on
option confirm off
open connection
cd /directory
put *.zip
close
exit


The error message is as follows:
Quote:
. 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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
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.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

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