Topic "call command"

Author Message
fungkw
[View user's profile]

Joined: 2017-01-10
Posts: 2
I am new to write winscp script. I want to execute a sh script in my winscp script like:

...
cd /folder
call ./batch.ksh parm
...

but it returns "500 "./BATCH.KSH PARM "

Then, I try the terminal feature in WinSCP GUI.
I enter command df and it returns:
500 'DF': command not understood.

It seems that winscp change everything after "call" to capital letters.
Advertisements
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27083
Location: Prague, Czechia
You cannot use the call command to execute shell scripts with FTP protocol. Except, if the FTP server supports SITE EXEC command or similar.

See
https://winscp.net/eng/docs/scriptcommand_call
https://winscp.net/eng/docs/remote_command
fungkw
[View user's profile]

Joined: 2017-01-10
Posts: 2
Thanks.

But how about the second part of my question?

Then, I try the terminal feature in WinSCP GUI.
I enter command df and it returns:
500 'DF': command not understood.

It seems that winscp change everything after "call" to capital letters.

I tried "df" or "ls" but the console changes the commands to capital letters and said "command not understood"?
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27083
Location: Prague, Czechia
The terminal window of WinSCP is functionally equivalent to the call command.
So again, you cannot execute shell scripts with FTP protocol.

Btw, it's not WinSCP that converts the commands to upper case. It's your FTP server. But that's irrelevant to the actual problem.
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