Topic "Running a command in Script"

Author Message
marshyrob
[View user's profile]

Joined: 2006-09-25
Posts: 1
Hi All

Im very new to scripting and WINSCP. Ive made a script which logs into a F5 loadbalancer (3BSD) and copies a backup file down to a directory. This works fine. I would like to run a command, once logged in via the script, to create a backup.

The command is "b config save <filename>"

How do i run this command via the script. I have had a look on this site but i cant seem to find any examples. Is it even possible?

Here is my script:


option batch on
option confirm off
open xxxx:xxxxx@xxxxxx
cd /usr/local/ucs
option transfer binary
get *LBL* c:\F5Backups\
close

Any help would be appreciated.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Use script command call.
_________________
Martin Prikryl
Guest




prikryl wrote:
Use script command call.


Hi Martin

Thanks for the reply, i tried add in the call statement and got the follwoing error when i ran the script:

failed with return code 1 and error message
Error opening terminal: dumb..

My script looks like this now:


option batch on
option confirm off
open xxxx:xxxxx@xxxxx
cd /usr/local/ucs
call config save xxxCYx5xPC
option transfer binary
get *LBL* c:\F5Backups\
close
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Please read documentation about limitations of remote commands exeuction.
_________________
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